Improve Bukkit (un)loading once more

- Call CraftServer#synCommands after (un)loading plugin
- Force command registrations of ServerUtils
This commit is contained in:
Frank van der Heijden 2020-10-01 19:32:53 +02:00
parent 1723a9564f
commit 7d6d360908
No known key found for this signature in database
GPG key ID: 26DA56488D314D11
3 changed files with 26 additions and 11 deletions

View file

@ -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);
}
}