SteamWar/BungeeCore
Archiviert
13
2

Update TeamchatCommand
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-06-16 11:24:51 +02:00
Ursprung 8a21d5c93d
Commit fe135cd855

Datei anzeigen

@ -21,19 +21,19 @@ package de.steamwar.bungeecore.commands;
import de.steamwar.bungeecore.listeners.ChatListener;
import de.steamwar.bungeecore.sql.SteamwarUser;
import de.steamwar.command.SWCommand;
import de.steamwar.messages.ChatSender;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.connection.ProxiedPlayer;
public class TeamchatCommand extends BasicCommand {
public class TeamchatCommand extends SWCommand {
public TeamchatCommand() {
super("tc", "","teamchat");
}
@Override
public void execute(CommandSender s, String[] args) {
public void genericCommand(ProxiedPlayer s, String... message) {
ChatSender sender = ChatSender.of(s);
if(args.length == 0){
if(message.length == 0){
sender.system("TC_USAGE");
return;
}
@ -44,6 +44,6 @@ public class TeamchatCommand extends BasicCommand {
return;
}
ChatListener.sendChat(sender, ChatSender.allReceivers().filter(player -> player.user().getTeam() == user.getTeam()), "CHAT_TEAM", null, String.join(" ", args));
ChatListener.sendChat(sender, ChatSender.allReceivers().filter(player -> player.user().getTeam() == user.getTeam()), "CHAT_TEAM", null, String.join(" ", message));
}
}