Merge pull request 'Update ServerTeamchatCommand' (#400) from CommandServerTeamchat into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #400 Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
c3b3559875
@ -20,23 +20,24 @@
|
|||||||
package de.steamwar.bungeecore.commands;
|
package de.steamwar.bungeecore.commands;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.listeners.ChatListener;
|
import de.steamwar.bungeecore.listeners.ChatListener;
|
||||||
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
|
|
||||||
public class ServerTeamchatCommand extends BasicCommand {
|
public class ServerTeamchatCommand extends SWCommand {
|
||||||
|
|
||||||
public ServerTeamchatCommand() {
|
public ServerTeamchatCommand() {
|
||||||
super("stc", "bungeecore.teamchat","serverteamchat");
|
super("stc", "bungeecore.teamchat","serverteamchat");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Register(description = "STC_USAGE")
|
||||||
public void execute(CommandSender s, String[] args) {
|
public void genericCommand(CommandSender commandSender, String... message) {
|
||||||
ChatSender sender = ChatSender.of(s);
|
ChatSender sender = ChatSender.of(commandSender);
|
||||||
if(args.length == 0) {
|
if(message.length == 0) {
|
||||||
sender.system("STC_USAGE");
|
sender.system("STC_USAGE");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ChatListener.sendChat(sender, ChatSender.serverteamReceivers(), "CHAT_SERVERTEAM", null, String.join(" ", args));
|
ChatListener.sendChat(sender, ChatSender.serverteamReceivers(), "CHAT_SERVERTEAM", null, String.join(" ", message));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren