diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-01-15 08:16:57 +0000 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-01-15 08:16:57 +0000 |
commit | b2f0af9499e4d3785b13549ce40878ff482e4968 (patch) | |
tree | 70619920cbef824dc602cc54f87ddb302f36a160 /src/main/java | |
parent | 65cf915a15d69a6900abf563827ccb2ce77ea3a0 (diff) | |
download | bukkit-b2f0af9499e4d3785b13549ce40878ff482e4968.tar bukkit-b2f0af9499e4d3785b13549ce40878ff482e4968.tar.gz bukkit-b2f0af9499e4d3785b13549ce40878ff482e4968.tar.lz bukkit-b2f0af9499e4d3785b13549ce40878ff482e4968.tar.xz bukkit-b2f0af9499e4d3785b13549ce40878ff482e4968.zip |
Changed PluginDisableEvent to fire before the disabling of a plugin, instead of after (where it's then invalid). Thanks to holic for the PR.
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java index 5126f9a0..bccc0c13 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -991,6 +991,8 @@ public class JavaPluginLoader implements PluginLoader { } if (plugin.isEnabled()) { + server.getPluginManager().callEvent(new PluginDisableEvent(plugin)); + JavaPlugin jPlugin = (JavaPlugin) plugin; 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.getPluginManager().callEvent(new PluginDisableEvent(plugin)); - loaders.remove(jPlugin.getDescription().getName()); if (cloader instanceof PluginClassLoader) { |