Skip to content

Commit

Permalink
Revert groovy compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
caoli5288 committed Feb 5, 2021
1 parent 9ca11b9 commit cd09bec
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 57 deletions.
6 changes: 0 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@
<version>1.18.10</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.caoli5288</groupId>
<artifactId>bukkitgroovy</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>


Expand Down
12 changes: 2 additions & 10 deletions src/main/java/com/mengcraft/script/EventMapping.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ public boolean initialized(String name) {

@SneakyThrows
public EventListener getListener(String name) {
if (GroovyIntegration.isIntegrated()) {
return GroovyIntegration.getListener(name);
}
name = name.toLowerCase();
if (mapping.containsKey(name)) {
return mapping.get(name).getListener();
Expand All @@ -70,10 +67,8 @@ public EventListener getListener(String name) {
}

protected void loadClasses() {
if (!GroovyIntegration.isIntegrated()) {
URL path = Bukkit.class.getProtectionDomain().getCodeSource().getLocation();
loadClasses(null, Bukkit.class.getClassLoader(), path, "org/bukkit/event/(.*)/(.*)\\.class");
}
URL path = Bukkit.class.getProtectionDomain().getCodeSource().getLocation();
loadClasses(null, Bukkit.class.getClassLoader(), path, "org/bukkit/event/(.*)/(.*)\\.class");
}

protected void loadClasses(Plugin plugin, ClassLoader loader, URL path, String regex) {
Expand Down Expand Up @@ -118,9 +113,6 @@ public void init(String name) {

@SneakyThrows
public void init(Plugin plugin) {
if (GroovyIntegration.isIntegrated()) {
GroovyIntegration.loadClasses(plugin);
}
if (plugins.add(plugin.getName().toLowerCase())) {
Class<?> pluginClass = plugin.getClass();
URL path = pluginClass.getProtectionDomain().getCodeSource().getLocation();
Expand Down
38 changes: 0 additions & 38 deletions src/main/java/com/mengcraft/script/GroovyIntegration.java

This file was deleted.

3 changes: 0 additions & 3 deletions src/main/java/com/mengcraft/script/ScriptBootstrap.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ public void onLoad() {

@Override
public void onEnable() {
if (getServer().getPluginManager().isPluginEnabled("BukkitGroovy")) {
GroovyIntegration.integrate();
}
scriptLoader = new ScriptLoader();
getServer().getConsoleSender().sendMessage(ChatColor.GREEN + "梦梦家高性能服务器出租店");
getServer().getConsoleSender().sendMessage(ChatColor.GREEN + "shop105595113.taobao.com");
Expand Down

0 comments on commit cd09bec

Please sign in to comment.