diff options
author | Meaglin <meaglin.wasabi@gmail.com> | 2012-01-28 03:45:49 +0100 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-02-09 03:49:51 -0500 |
commit | 73a1c478541dfeebf099af46d08031ee94eaf5d1 (patch) | |
tree | 5f270a70a3136a0c1790e8a92dd5bb6971fbcb1b /src | |
parent | 4272a879f925950f18ddcdeffe124ba9c43e0095 (diff) | |
download | bukkit-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.java | 7 |
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); + } } } |