mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
Fix compat with PluginClassloader implementations
This commit is contained in:
parent
4d3ec19658
commit
1470add5c4
1 changed files with 6 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue