geforkt von SteamWar/BungeeCore
Simpliefied @play Revert Color
Dieser Commit ist enthalten in:
Ursprung
2807bf40e2
Commit
92ea2fa5d0
@ -138,27 +138,24 @@ public class ChatListener extends BasicListener {
|
||||
|
||||
private void publicChat(SteamwarUser user, ProxiedPlayer sender, String message){
|
||||
String name = sender.getDisplayName();
|
||||
String chatsuffix = "§7» ";
|
||||
String revertColor = "§7";
|
||||
String chatcolor = "§7";
|
||||
|
||||
message = message.replace('§', '&');
|
||||
if(sender.hasPermission("bungeecore.group.admin")){
|
||||
chatsuffix = "§7» §e";
|
||||
revertColor = "§e";
|
||||
chatcolor = "§e";
|
||||
message = ChatColor.translateAlternateColorCodes('&', message);
|
||||
}else if(
|
||||
sender.hasPermission("bungeecore.group.developer") ||
|
||||
sender.hasPermission("bungeecore.group.moderator") ||
|
||||
sender.hasPermission("bungeecore.group.supporter") ||
|
||||
sender.hasPermission("bungeecore.group.builder")){
|
||||
chatsuffix = "§7» §r";
|
||||
revertColor = "§r";
|
||||
chatcolor = "§r";
|
||||
message = ChatColor.translateAlternateColorCodes('&', message);
|
||||
}else if(sender.hasPermission("bungeecore.group.youtuber")){
|
||||
message = ChatColor.translateAlternateColorCodes('&', message);
|
||||
}
|
||||
|
||||
String msg = name + chatsuffix + message;
|
||||
String msg = name + "§7» " + chatcolor + message;
|
||||
if(user.getTeam() != 0){
|
||||
msg = "§8" + Team.get(user.getTeam()).getTeamKuerzel() + " §r" + msg;
|
||||
}
|
||||
@ -167,7 +164,7 @@ public class ChatListener extends BasicListener {
|
||||
Subserver targetServer = Subserver.getSubserver(target);
|
||||
if(targetServer == null || targetServer.getType() != Servertype.ARENA || targetServer.getServer() != target.getServer().getInfo()){
|
||||
if(msg.contains("@" + target.getName())) {
|
||||
BungeeCore.send(target, ChatMessageType.CHAT, msg.replace("@" + target.getName(), "§e@" + target.getName() + revertColor));
|
||||
BungeeCore.send(target, ChatMessageType.CHAT, msg.replace("@" + target.getName(), "§e@" + target.getName() + chatcolor));
|
||||
}else {
|
||||
BungeeCore.send(target, ChatMessageType.CHAT, msg);
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren