Bukkit/Bukkit — pull request #788 by cybertiger (2013-03-10 14:35:44+00:00)
Title: Remove commands when disabling plugins, otherwise a call to PluginManage...

Disable a plugin's commands when disabling a plugin.

Calling PluginManager.disablePlugin(myPlugin) followed by PluginManager.enablePlugin(myPlugin) causes duplicate commands to be added, this fix addresses that.

Example plugin that requires this: http://dev.bukkit.org/server-mods/easyscript/ (it requires the ability to reload itself)

I'm not particularly happy with this code, but I can't think of a way of fixing it without exposing server.getCommandMap() in bukkit, or rewriting the entire *.command.* to be more plugin aware.