geforkt von Mirrors/Paper
Fix compat with PluginClassloader implementations
Dieser Commit ist enthalten in:
Ursprung
4d3ec19658
Commit
1470add5c4
@ -7,7 +7,7 @@ This should close more memory leaks from /reload and disabling plugins,
|
||||
by closing the class loader and the jar file.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/PluginLoader.java b/src/main/java/org/bukkit/plugin/PluginLoader.java
|
||||
index e7981a1d..541f85bc 100644
|
||||
index e7981a1d..d34756f1 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/PluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/PluginLoader.java
|
||||
@@ -0,0 +0,0 @@ public interface PluginLoader {
|
||||
@ -24,7 +24,10 @@ index e7981a1d..541f85bc 100644
|
||||
+ * @param plugin Plugin to disable
|
||||
+ * @param closeClassloader if the classloader for the Plugin should be closed
|
||||
+ */
|
||||
+ public void disablePlugin(Plugin plugin, boolean closeClassloader);
|
||||
+ // provide default to allow other PluginLoader implementations to work
|
||||
+ default public void disablePlugin(Plugin plugin, boolean closeClassloader) {
|
||||
+ disablePlugin(plugin);
|
||||
+ }
|
||||
+ // Paper end - close Classloader on disable
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/PluginManager.java b/src/main/java/org/bukkit/plugin/PluginManager.java
|
||||
@ -97,7 +100,7 @@ index bd0588a2..cb2b0b9c 100644
|
||||
lookupNames.clear();
|
||||
HandlerList.unregisterAll();
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
index 40fd71dc..43ec5369 100644
|
||||
index 40fd71dc..3e87c3dd 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
@@ -0,0 +0,0 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren