13
0
geforkt von Mirrors/Paper

Changed PluginDisableEvent to fire before the disabling of a plugin, instead of after (where it's then invalid). Thanks to holic for the PR.

By: Nathan Adams <dinnerbone@dinnerbone.com>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2012-01-15 08:16:57 +00:00
Ursprung 0c182ec82d
Commit 4e9fcec4a4

Datei anzeigen

@ -991,6 +991,8 @@ public class JavaPluginLoader implements PluginLoader {
} }
if (plugin.isEnabled()) { if (plugin.isEnabled()) {
server.getPluginManager().callEvent(new PluginDisableEvent(plugin));
JavaPlugin jPlugin = (JavaPlugin) plugin; JavaPlugin jPlugin = (JavaPlugin) plugin;
ClassLoader cloader = jPlugin.getClassLoader(); ClassLoader cloader = jPlugin.getClassLoader();
@ -1000,8 +1002,6 @@ public class JavaPluginLoader implements PluginLoader {
server.getLogger().log(Level.SEVERE, "Error occurred while disabling " + plugin.getDescription().getFullName() + " (Is it up to date?): " + ex.getMessage(), ex); server.getLogger().log(Level.SEVERE, "Error occurred while disabling " + plugin.getDescription().getFullName() + " (Is it up to date?): " + ex.getMessage(), ex);
} }
server.getPluginManager().callEvent(new PluginDisableEvent(plugin));
loaders.remove(jPlugin.getDescription().getName()); loaders.remove(jPlugin.getDescription().getName());
if (cloader instanceof PluginClassLoader) { if (cloader instanceof PluginClassLoader) {