Improve Bukkit (un)loading once more
- Call CraftServer#synCommands after (un)loading plugin - Force command registrations of ServerUtils
This commit is contained in:
parent
1723a9564f
commit
7d6d360908
3 changed files with 26 additions and 11 deletions
|
|
@ -46,7 +46,7 @@ public class ServerUtils extends JavaPlugin implements CommandExecutor {
|
|||
new BukkitReflection();
|
||||
|
||||
this.commandManager = new PaperCommandManager(this);
|
||||
commandManager.registerCommand(new CommandServerUtils());
|
||||
commandManager.registerCommand(new CommandServerUtils(), true);
|
||||
this.commandPlugins = null;
|
||||
|
||||
BukkitPluginManager manager = plugin.getPluginManager();
|
||||
|
|
@ -113,7 +113,7 @@ public class ServerUtils extends JavaPlugin implements CommandExecutor {
|
|||
if (!Config.getInstance().getConfig().getBoolean("settings.disable-plugins-command")) {
|
||||
this.removeCommands("pl", "plugins");
|
||||
this.commandPlugins = new CommandPlugins();
|
||||
commandManager.registerCommand(commandPlugins);
|
||||
commandManager.registerCommand(commandPlugins, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue