From d32f5738fd2c4e156f62a7aaa78259c191a4a63f Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Mon, 26 Oct 2026 15:22:35 +0100 Subject: [PATCH] Rework chat icon and name colors - Mark the receiver's default channel with a green icon - Show the TeamChat icon in yellow, all other channel icons in gray - Use the rank prefix and rank color for sender names in TeamChat and ServerTeamChat, like in the global chat --- .../src/de/steamwar/messages/BungeeCore.properties | 4 ++-- .../src/de/steamwar/messages/BungeeCore_de.properties | 4 ++-- .../src/de/steamwar/velocitycore/chat/ChatChannel.java | 10 +++++++++- .../src/de/steamwar/velocitycore/chat/TeamChannel.java | 5 +++++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/VelocityCore/src/de/steamwar/messages/BungeeCore.properties b/VelocityCore/src/de/steamwar/messages/BungeeCore.properties index 8e47001e..b3d563e4 100644 --- a/VelocityCore/src/de/steamwar/messages/BungeeCore.properties +++ b/VelocityCore/src/de/steamwar/messages/BungeeCore.properties @@ -573,11 +573,11 @@ CHAT_BC_USAGE = §8/§7bc §8[§emessage§8] CHAT_NO_RECEIVER = §cNobody receives your message CHAT_EMPTY = §cDon\'t write meaningless empty messages. -CHAT_SERVERTEAM_SENDER = §e{0} +CHAT_SERVERTEAM_SENDER = {4}{5}{6}{0} CHAT_SERVERTEAM = §8» §f{2} CHAT_GLOBAL_SENDER = {4}{5}{6}{0} CHAT_GLOBAL = §8» {7}{2} -CHAT_TEAM_SENDER = §e{0} +CHAT_TEAM_SENDER = {4}{5}{6}{0} CHAT_TEAM = §8» §f{2} CHAT_MSG_SENDER = §e{0} CHAT_MSG_SEPARATOR = §8» diff --git a/VelocityCore/src/de/steamwar/messages/BungeeCore_de.properties b/VelocityCore/src/de/steamwar/messages/BungeeCore_de.properties index 6f23220f..ee6ab6a6 100644 --- a/VelocityCore/src/de/steamwar/messages/BungeeCore_de.properties +++ b/VelocityCore/src/de/steamwar/messages/BungeeCore_de.properties @@ -538,11 +538,11 @@ CHAT_BC_USAGE = §8/§7bc §8[§eNachricht§8] CHAT_NO_RECEIVER = §cNiemand empfängt deine Nachricht CHAT_EMPTY = §cSchreibe keine inhaltslosen Nachrichten. -CHAT_SERVERTEAM_SENDER = §e{0} +CHAT_SERVERTEAM_SENDER = {4}{5}{6}{0} CHAT_SERVERTEAM = §8» §f{2} CHAT_GLOBAL_SENDER = {4}{5}{6}{0} CHAT_GLOBAL = §8» {7}{2} -CHAT_TEAM_SENDER = §e{0} +CHAT_TEAM_SENDER = {4}{5}{6}{0} CHAT_TEAM = §8» §f{2} CHAT_MSG_SENDER = §e{0} CHAT_MSG_SEPARATOR = §8» diff --git a/VelocityCore/src/de/steamwar/velocitycore/chat/ChatChannel.java b/VelocityCore/src/de/steamwar/velocitycore/chat/ChatChannel.java index 4bc9d919..bb4cf45e 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/chat/ChatChannel.java +++ b/VelocityCore/src/de/steamwar/velocitycore/chat/ChatChannel.java @@ -65,6 +65,13 @@ public abstract class ChatChannel { return null; } + /** + * @return the color of the channel icon if it is not the default channel of the receiver + */ + protected String iconColor() { + return "§7"; + } + /** * @return the text put into the chat input when clicking the channel icon to write a single message, null if there is none */ @@ -131,7 +138,8 @@ public abstract class ChatChannel { Component msg = ChatFormat.withMentionHovers(receiver, format(receiver, sender, coloredMessage)); if (icon(receiver) != null) { - Component icon = iconComponent(receiver, ChatManager.getDefault(receiver) == this ? "§e" : "§7"); + // The default channel of the receiver is marked by a green icon + Component icon = iconComponent(receiver, ChatManager.getDefault(receiver) == this ? "§a" : iconColor()); msg = Component.text().append(icon).append(Component.text(" ")).append(msg).build(); } receiver.sendMessage(msg); diff --git a/VelocityCore/src/de/steamwar/velocitycore/chat/TeamChannel.java b/VelocityCore/src/de/steamwar/velocitycore/chat/TeamChannel.java index 4603c3d5..13adcf88 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/chat/TeamChannel.java +++ b/VelocityCore/src/de/steamwar/velocitycore/chat/TeamChannel.java @@ -49,6 +49,11 @@ public class TeamChannel extends ChatChannel { return new Message("CHAT_CHANNEL_TEAM"); } + @Override + protected String iconColor() { + return "§e"; + } + @Override protected Message icon(Chatter receiver) { return new Message("CHAT_ICON_TEAM");