unregister event listeners when plugin is disabled (better co-op with other plugins)
This commit is contained in:
parent
777fb9ce5b
commit
79e05f2bc0
1 changed files with 1 additions and 2 deletions
|
@ -668,7 +668,6 @@ See [issue #69][issue69] for more information.
|
||||||
***/
|
***/
|
||||||
global.refresh = function(){
|
global.refresh = function(){
|
||||||
__plugin.pluginLoader.disablePlugin(__plugin);
|
__plugin.pluginLoader.disablePlugin(__plugin);
|
||||||
org.bukkit.event.HandlerList["unregisterAll(org.bukkit.plugin.Plugin)"](__plugin);
|
|
||||||
__plugin.pluginLoader.enablePlugin(__plugin);
|
__plugin.pluginLoader.enablePlugin(__plugin);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -701,8 +700,8 @@ See [issue #69][issue69] for more information.
|
||||||
if (pluginData.persistent)
|
if (pluginData.persistent)
|
||||||
save(pluginData.module.store, jsPluginsRootDirName + "/" + moduleName + "-store.txt");
|
save(pluginData.module.store, jsPluginsRootDirName + "/" + moduleName + "-store.txt");
|
||||||
}
|
}
|
||||||
|
|
||||||
_runUnloadHandlers();
|
_runUnloadHandlers();
|
||||||
|
org.bukkit.event.HandlerList["unregisterAll(org.bukkit.plugin.Plugin)"](__plugin);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in a new issue