summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMeaglin <meaglin.wasabi@gmail.com>2012-01-28 03:45:49 +0100
committerEvilSeph <evilseph@gmail.com>2012-02-09 03:49:51 -0500
commit73a1c478541dfeebf099af46d08031ee94eaf5d1 (patch)
tree5f270a70a3136a0c1790e8a92dd5bb6971fbcb1b /src
parent4272a879f925950f18ddcdeffe124ba9c43e0095 (diff)
downloadbukkit-73a1c478541dfeebf099af46d08031ee94eaf5d1.tar
bukkit-73a1c478541dfeebf099af46d08031ee94eaf5d1.tar.gz
bukkit-73a1c478541dfeebf099af46d08031ee94eaf5d1.tar.lz
bukkit-73a1c478541dfeebf099af46d08031ee94eaf5d1.tar.xz
bukkit-73a1c478541dfeebf099af46d08031ee94eaf5d1.zip
Properly unregister plugin channels when a plugin gets disabled.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/plugin/SimplePluginManager.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index cc99bf83..e302bcc0 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -416,6 +416,13 @@ public final class SimplePluginManager implements PluginManager {
} catch (Throwable ex) {
server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while unregistering events for " + plugin.getDescription().getFullName() + " (Is it up to date?): " + ex.getMessage(), ex);
}
+
+ try {
+ server.getMessenger().unregisterIncomingPluginChannel(plugin);
+ server.getMessenger().unregisterOutgoingPluginChannel(plugin);
+ } catch(Throwable ex) {
+ server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while unregistering plugin channels for " + plugin.getDescription().getFullName() + " (Is it up to date?): " + ex.getMessage(), ex);
+ }
}
}