register the commands

This commit is contained in:
destro174 2021-06-23 21:48:46 +02:00
parent 1e3095d396
commit b5b9f92cfb

View File

@ -1,6 +1,8 @@
package com.alttd.chat; package com.alttd.chat;
import com.alttd.chat.commands.GlobalChat; import com.alttd.chat.commands.GlobalChat;
import com.alttd.chat.commands.Message;
import com.alttd.chat.commands.Reply;
import com.alttd.chat.config.Config; import com.alttd.chat.config.Config;
import com.alttd.chat.handler.ChatHandler; import com.alttd.chat.handler.ChatHandler;
import com.alttd.chat.listeners.ChatListener; import com.alttd.chat.listeners.ChatListener;
@ -28,6 +30,8 @@ public class ChatPlugin extends JavaPlugin {
chatHandler = new ChatHandler(); chatHandler = new ChatHandler();
registerListener(new PlayerListener(), new ChatListener()); registerListener(new PlayerListener(), new ChatListener());
registerCommand("globalchat", new GlobalChat()); registerCommand("globalchat", new GlobalChat());
registerCommand("message", new Message());
registerCommand("reply", new Reply());
messageChannel = Config.MESSAGECHANNEL; messageChannel = Config.MESSAGECHANNEL;
getServer().getMessenger().registerOutgoingPluginChannel(this, messageChannel); getServer().getMessenger().registerOutgoingPluginChannel(this, messageChannel);