Add TeamchatCommand MultiLang
Dieser Commit ist enthalten in:
Ursprung
0d6eecbbd4
Commit
d470a56ffa
@ -53,7 +53,6 @@ import java.util.logging.Level;
|
||||
|
||||
public class BungeeCore extends Plugin {
|
||||
|
||||
public static final String TEAMCHAT_PREFIX = "§8TC §e";
|
||||
public static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("dd.MM.yyyy");
|
||||
|
||||
public static String CHAT_PREFIX;
|
||||
|
@ -19,10 +19,9 @@
|
||||
|
||||
package de.steamwar.bungeecore.commands;
|
||||
|
||||
import de.steamwar.bungeecore.BungeeCore;
|
||||
import de.steamwar.bungeecore.Message;
|
||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import net.md_5.bungee.api.ChatMessageType;
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
@ -40,17 +39,16 @@ public class TeamchatCommand extends BasicCommand {
|
||||
SteamwarUser user = SteamwarUser.get(player.getUniqueId());
|
||||
|
||||
if(user.getTeam() == 0){
|
||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDu bist in keinem Team");
|
||||
Message.send("TC_NO_TEAM", player);
|
||||
return;
|
||||
}
|
||||
|
||||
if(args.length == 0){
|
||||
BungeeCore.send(player, BungeeCore.TEAMCHAT_PREFIX + "/teamchat [Nachricht an das Team]");
|
||||
Message.send("TC_SYNTAX", player);
|
||||
return;
|
||||
}
|
||||
|
||||
StringBuilder msgBuilder = new StringBuilder();
|
||||
msgBuilder.append(BungeeCore.TEAMCHAT_PREFIX).append(sender.getName()).append("§8» §r");
|
||||
for (String arg : args){
|
||||
msgBuilder.append(arg).append(" ");
|
||||
}
|
||||
@ -61,7 +59,7 @@ public class TeamchatCommand extends BasicCommand {
|
||||
SteamwarUser targetuser = SteamwarUser.get(target.getUniqueId());
|
||||
if (targetuser.getTeam() == user.getTeam()
|
||||
&& target.getChatMode() == ProxiedPlayer.ChatMode.SHOWN){
|
||||
BungeeCore.send(target, ChatMessageType.CHAT, msg);
|
||||
Message.send("TC_FORMAT", target, player.getName(), msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -283,4 +283,9 @@ REGELN_WS_URL=https://steamwar.de/spielmodi/warship-regelwerk/
|
||||
|
||||
#ServerTeamchatCommand
|
||||
STC_SYNTAX=/stc [Nachricht an das Team]
|
||||
STC_FORMAT=§8STC §e{0}» §r{1}
|
||||
STC_FORMAT=§8STC §e{0}» §r{1}
|
||||
|
||||
#TeamchatCommand
|
||||
TC_SYNTAX=/teamchat [Nachricht an das Team]
|
||||
TC_NO_TEAM=§cDu bist in keinem Team
|
||||
TC_FORMAT=§8TC §e{0}§8» §r{1}
|
In neuem Issue referenzieren
Einen Benutzer sperren