Properly unregister plugin channels when a plugin gets disabled.

By: Meaglin <meaglin.wasabi@gmail.com>
This commit is contained in:
Bukkit/Spigot 2012-01-28 03:45:49 +01:00
parent b51e8579ef
commit 3dadfe5e85

View File

@ -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);
}
}
}