diff --git a/VelocityCore/src/de/steamwar/messages/BungeeCore.properties b/VelocityCore/src/de/steamwar/messages/BungeeCore.properties index bff90140..b617fd32 100644 --- a/VelocityCore/src/de/steamwar/messages/BungeeCore.properties +++ b/VelocityCore/src/de/steamwar/messages/BungeeCore.properties @@ -583,7 +583,7 @@ CHAT_FIGHT_PARTICIPANT = {0} {1}§8» §7{2} CHAT_FIGHT_SPECTATOR = §7{0}§8» §7{1} CHAT_FIGHT_REFEREE = §e{0}§8» §e{1} CHAT_FIGHT_TEAM = {0} {1}§8» §f{2} -CHAT_TAGGED = §8[{0}§8] §r{1} +CHAT_TAGGED = §8{0} §r{1} CHAT_CHANNEL_GLOBAL = §eGlobal CHAT_CHANNEL_ARENA = §e{0} CHAT_CHANNEL_FIGHT_TEAM = §e{0} {1} diff --git a/VelocityCore/src/de/steamwar/messages/BungeeCore_de.properties b/VelocityCore/src/de/steamwar/messages/BungeeCore_de.properties index 3f34d888..e253ce72 100644 --- a/VelocityCore/src/de/steamwar/messages/BungeeCore_de.properties +++ b/VelocityCore/src/de/steamwar/messages/BungeeCore_de.properties @@ -548,7 +548,7 @@ CHAT_FIGHT_PARTICIPANT = {0} {1}§8» §7{2} CHAT_FIGHT_SPECTATOR = §7{0}§8» §7{1} CHAT_FIGHT_REFEREE = §e{0}§8» §e{1} CHAT_FIGHT_TEAM = {0} {1}§8» §f{2} -CHAT_TAGGED = §8[{0}§8] §r{1} +CHAT_TAGGED = §8{0} §r{1} CHAT_CHANNEL_GLOBAL = §eGlobal CHAT_CHANNEL_ARENA = §e{0} CHAT_CHANNEL_FIGHT_TEAM = §e{0} {1} diff --git a/VelocityCore/src/de/steamwar/velocitycore/chat/ChatChannel.java b/VelocityCore/src/de/steamwar/velocitycore/chat/ChatChannel.java index 8c3be5f9..8d25acb1 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/chat/ChatChannel.java +++ b/VelocityCore/src/de/steamwar/velocitycore/chat/ChatChannel.java @@ -47,6 +47,13 @@ public abstract class ChatChannel { */ public abstract Message tag(Chatter receiver); + /** + * @return false if the message format already shows the channel, so no tag is put in front + */ + protected boolean tagged() { + return true; + } + public abstract Stream readers(); /** @@ -90,8 +97,8 @@ public abstract class ChatChannel { if (!receiver.chatShown()) continue; Message msg = format(receiver, sender, coloredMessage); - if (ChatManager.getDefault(receiver) != this) { - msg = new Message("CHAT_TAGGED", tag(receiver), msg); + if (tagged() && ChatManager.getDefault(receiver) != this) { + msg = new Message("CHAT_TAGGED", receiver.parseToPlain(tag(receiver)), msg); } receiver.send(false, null, null, msg); diff --git a/VelocityCore/src/de/steamwar/velocitycore/chat/DirectChannel.java b/VelocityCore/src/de/steamwar/velocitycore/chat/DirectChannel.java index b369bafd..0871357b 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/chat/DirectChannel.java +++ b/VelocityCore/src/de/steamwar/velocitycore/chat/DirectChannel.java @@ -59,6 +59,11 @@ public class DirectChannel extends ChatChannel { return new Message("CHAT_CHANNEL_MSG", SteamwarUser.get(partner(receiver.user().getUUID()))); } + @Override + protected boolean tagged() { + return false; + } + @Override public Stream readers() { return Stream.of(first, second)