Register ignore command

This commit is contained in:
Draycia committed 2020-06-15 20:10:50 -07:00
1 parent 85a938005b
commit 2856bb4ec7
1 file changed
+8 -3
@@ -5,6 +5,7 @@ import co.aikar.commands.ConditionFailedException;
import net.draycia.simplechat.channels.ChatChannel; import net.draycia.simplechat.channels.ChatChannel;
import net.draycia.simplechat.channels.SimpleChatChannel; import net.draycia.simplechat.channels.SimpleChatChannel;
import net.draycia.simplechat.commands.ChannelCommand; import net.draycia.simplechat.commands.ChannelCommand;
import net.draycia.simplechat.commands.IgnoreCommand;
import net.draycia.simplechat.commands.ToggleCommand; import net.draycia.simplechat.commands.ToggleCommand;
import net.draycia.simplechat.listeners.PlayerChatListener; import net.draycia.simplechat.listeners.PlayerChatListener;
import net.kyori.text.format.TextColor; import net.kyori.text.format.TextColor;
@@ -189,10 +190,8 @@ public final class SimpleChat extends JavaPlugin {
getLogger().info("mcMMO installed but no Party channel is setup!"); getLogger().info("mcMMO installed but no Party channel is setup!");
} }
manager.registerCommand(new ChannelCommand(this));
manager.registerCommand(new ToggleCommand(this));
setupListeners(); setupListeners();
setupCommands(manager);
} }
@Override @Override
@@ -200,6 +199,12 @@ public final class SimpleChat extends JavaPlugin {
// Plugin shutdown logic // Plugin shutdown logic
} }
private void setupCommands(BukkitCommandManager manager) {
manager.registerCommand(new ToggleCommand(this));
manager.registerCommand(new ChannelCommand(this));
manager.registerCommand(new IgnoreCommand(this));
}
private void setupListeners() { private void setupListeners() {
getServer().getPluginManager().registerEvents(new PlayerChatListener(this), this); getServer().getPluginManager().registerEvents(new PlayerChatListener(this), this);
} }