Incorporate the attached plugin manager patch. From aznidin:
"With the existing code, a parent plugin's destroyPlugin() is called more than once, addition of which is caused by the number of children plugins. It's the side effect of recursion. The key point is to call parentPluginMap.remove() and childPluginMap.remove() first before recursing the unloadPlugin().
Also, I've added some more codes into PluginManager.java for proper PluginListener implementation. Still a recursion effect and the order of plugins destroyed, the PluginListener.pluginDestroyed() isn't called whenever it should be. Additional info is provided as source comments. Please see the diff file attached."