Unregister commands before trying to override them (bukkit)
This commit is contained in:
parent
168b7e23d7
commit
df55162d73
1 changed files with 2 additions and 0 deletions
|
|
@ -106,10 +106,12 @@ public class BukkitPlugin extends ServerUtilsPlugin<
|
|||
protected void reloadPlugin() {
|
||||
if (getConfigResource().getConfig().getBoolean("settings.disable-plugins-command")) {
|
||||
if (registeredPluginsCommand) {
|
||||
BukkitPluginManager.unregisterCommands("pl", "plugins");
|
||||
plugin.restoreBukkitPluginCommand();
|
||||
this.registeredPluginsCommand = false;
|
||||
}
|
||||
} else {
|
||||
BukkitPluginManager.unregisterCommands("pl", "plugins");
|
||||
new BukkitCommandPlugins(this).register(commandManager);
|
||||
this.registeredPluginsCommand = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue