From b4b46b56a4ade8b40a9d55425bfd3a7b5c412a76 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 16 Jun 2022 11:18:13 +0200 Subject: [PATCH] Update ServerTeamchatCommand --- .../bungeecore/commands/ServerTeamchatCommand.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/ServerTeamchatCommand.java b/src/de/steamwar/bungeecore/commands/ServerTeamchatCommand.java index 26b4db1..ea4ce9f 100644 --- a/src/de/steamwar/bungeecore/commands/ServerTeamchatCommand.java +++ b/src/de/steamwar/bungeecore/commands/ServerTeamchatCommand.java @@ -20,23 +20,24 @@ package de.steamwar.bungeecore.commands; import de.steamwar.bungeecore.listeners.ChatListener; +import de.steamwar.command.SWCommand; import de.steamwar.messages.ChatSender; import net.md_5.bungee.api.CommandSender; -public class ServerTeamchatCommand extends BasicCommand { +public class ServerTeamchatCommand extends SWCommand { public ServerTeamchatCommand() { super("stc", "bungeecore.teamchat","serverteamchat"); } - @Override - public void execute(CommandSender s, String[] args) { - ChatSender sender = ChatSender.of(s); - if(args.length == 0) { + @Register(description = "STC_USAGE") + public void genericCommand(CommandSender commandSender, String... message) { + ChatSender sender = ChatSender.of(commandSender); + if(message.length == 0) { sender.system("STC_USAGE"); return; } - ChatListener.sendChat(sender, ChatSender.serverteamReceivers(), "CHAT_SERVERTEAM", null, String.join(" ", args)); + ChatListener.sendChat(sender, ChatSender.serverteamReceivers(), "CHAT_SERVERTEAM", null, String.join(" ", message)); } } -- 2.39.2