summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorNathan Adams <dinnerbone@dinnerbone.com>2012-01-15 08:16:57 +0000
committerNathan Adams <dinnerbone@dinnerbone.com>2012-01-15 08:16:57 +0000
commitb2f0af9499e4d3785b13549ce40878ff482e4968 (patch)
tree70619920cbef824dc602cc54f87ddb302f36a160 /src/main/java
parent65cf915a15d69a6900abf563827ccb2ce77ea3a0 (diff)
downloadbukkit-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.java4
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) {