Trying to make completion work...

This commit is contained in:
underscore11code authored and Josh (Vicarious) committed 2020-08-09 00:04:29 -07:00
1 parent 4897ed68fd
commit 6bdcc15bca
2 files changed
+15 -12

No files matched your search

@@ -20,6 +20,8 @@ public class ChatReloadCommand extends BaseCommand {
public void baseCommand(CommandSender sender) { public void baseCommand(CommandSender sender) {
carbonChat.reloadConfig(); carbonChat.reloadConfig();
carbonChat.getCommandManager().reloadCommands();
carbonChat.getChannelManager().reload(); carbonChat.getChannelManager().reload();
Component message = carbonChat.getAdventureManager().processMessage(carbonChat.getConfig().getString("language.reloaded"), Component message = carbonChat.getAdventureManager().processMessage(carbonChat.getConfig().getString("language.reloaded"),
@@ -78,20 +78,21 @@ public class CommandManager {
} }
}); });
setupCommands(commandManager); reloadCommands();
} }
private void setupCommands(BukkitCommandManager manager) { public void reloadCommands() {
manager.registerCommand(new ToggleCommand()); this.commandManager.unregisterCommands();
manager.registerCommand(new ChannelCommand()); this.commandManager.registerCommand(new ToggleCommand());
manager.registerCommand(new IgnoreCommand()); this.commandManager.registerCommand(new ChannelCommand());
manager.registerCommand(new ChatReloadCommand()); this.commandManager.registerCommand(new IgnoreCommand());
manager.registerCommand(new MeCommand()); this.commandManager.registerCommand(new ChatReloadCommand());
manager.registerCommand(new MessageCommand()); this.commandManager.registerCommand(new MeCommand());
manager.registerCommand(new NicknameCommand()); this.commandManager.registerCommand(new MessageCommand());
manager.registerCommand(new ReplyCommand()); this.commandManager.registerCommand(new NicknameCommand());
manager.registerCommand(new SetColorCommand()); this.commandManager.registerCommand(new ReplyCommand());
manager.registerCommand(new SpyChannelCommand()); this.commandManager.registerCommand(new SetColorCommand());
this.commandManager.registerCommand(new SpyChannelCommand());
} }
public co.aikar.commands.CommandManager getCommandManager() { public co.aikar.commands.CommandManager getCommandManager() {