More MultiLang #169
@ -53,7 +53,6 @@ import java.util.logging.Level;
|
||||
|
||||
public class BungeeCore extends Plugin {
|
||||
|
||||
public static final String SERVER_TEAMCHAT_PREFIX = "§8STC §e";
|
||||
public static final String TEAMCHAT_PREFIX = "§8TC §e";
|
||||
public static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("dd.MM.yyyy");
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
package de.steamwar.bungeecore.commands;
|
||||
|
||||
import de.steamwar.bungeecore.BungeeCore;
|
||||
import de.steamwar.bungeecore.Message;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
@ -37,27 +37,26 @@ public class ServerTeamchatCommand extends BasicCommand {
|
||||
ProxiedPlayer player = (ProxiedPlayer) sender;
|
||||
|
||||
if(args.length == 0){
|
||||
player.sendMessage(BungeeCore.CHAT_PREFIX + "/stc [Nachricht an das Team]");
|
||||
Message.sendPrefixless("STC_SYNTAX", player);
|
||||
return;
|
||||
}
|
||||
|
||||
StringBuilder msgBuilder = new StringBuilder();
|
||||
msgBuilder.append(BungeeCore.SERVER_TEAMCHAT_PREFIX).append(sender.getName()).append("» §r");
|
||||
for (String arg : args){
|
||||
msgBuilder.append(arg).append(" ");
|
||||
}
|
||||
String msg = msgBuilder.toString();
|
||||
msg = ChatColor.translateAlternateColorCodes('&', msg);
|
||||
|
||||
sendToTeam(msg);
|
||||
sendToTeam(msg, player);
|
||||
}
|
||||
}
|
||||
|
||||
public static void sendToTeam(String message){
|
||||
public static void sendToTeam(String message, ProxiedPlayer sender){
|
||||
for (ProxiedPlayer target : ProxyServer.getInstance().getPlayers()){
|
||||
if ((target.hasPermission("bungeecore.teamchat"))
|
||||
&& target.getChatMode() == ProxiedPlayer.ChatMode.SHOWN){
|
||||
BungeeCore.send(target, message);
|
||||
Message.send("STC_FORMAT", target, sender.getName(), message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -279,4 +279,8 @@ REGELN_WG_HOVER=§7https://steamwar.de/spielmodi/wargear-regelwerk/
|
||||
REGELN_WG_URL=https://steamwar.de/spielmodi/wargear-regelwerk/
|
||||
REGELN_WS=§eWarShip§8-§7Regelwerk
|
||||
REGELN_WS_HOVER=§7https://steamwar.de/spielmodi/warship-regelwerk/
|
||||
REGELN_WS_URL=https://steamwar.de/spielmodi/warship-regelwerk/
|
||||
REGELN_WS_URL=https://steamwar.de/spielmodi/warship-regelwerk/
|
||||
|
||||
#ServerTeamchatCommand
|
||||
STC_SYNTAX=/stc [Nachricht an das Team]
|
||||
STC_FORMAT=§8STC §e{0}» §r{1}
|
In neuem Issue referenzieren
Einen Benutzer sperren