13
0
geforkt von Mirrors/Paper

Catch setEnabled to ensure classloader is properly unloaded (#10020)

Dieser Commit ist enthalten in:
Owen1212055 2023-12-10 20:02:26 -05:00
Ursprung a3a40ecd2b
Commit a52612213b

Datei anzeigen

@ -3994,8 +3994,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ plugin.getLogger().info("Disabling %s".formatted(pluginName));
+
+ this.server.getPluginManager().callEvent(new PluginDisableEvent(plugin));
+
+ javaPlugin.setEnabled(false);
+ try {
+ javaPlugin.setEnabled(false);
+ } catch (Throwable ex) {
+ this.server.getLogger().log(Level.SEVERE, "Error occurred while disabling " + pluginName, ex);
+ }
+
+ ClassLoader classLoader = plugin.getClass().getClassLoader();
+ if (classLoader instanceof ConfiguredPluginClassLoader configuredPluginClassLoader) {