From d1b09cdd6ceacb506651457a6a7ca6f4c095676d Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Mon, 25 Sep 2023 11:58:13 +0700 Subject: [PATCH] fix chat type and the related stuff --- .../chayapak/chomens_bot/plugins/ChatPlugin.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ChatPlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ChatPlugin.java index ca17dcf..959ca75 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ChatPlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ChatPlugin.java @@ -122,10 +122,10 @@ public class ChatPlugin extends Bot.Listener { case 1 -> translation = "chat.type.emote"; // /me case 2 -> translation = "commands.message.display.incoming"; // player that received /w message case 3 -> translation = "commands.message.display.outgoing"; // player that sent /w message - case 4 -> translation = "chat.type.announcement"; // /say - case 5 -> translation = "chat.type.team.text"; // player that received /teammsg message - case 6 -> translation = "chat.type.team.sent"; // player that sent /teammsg message - case 7 -> translation = "%s"; // raw, idk when and where this is used + case 4 -> translation = "%s"; // idk what this is but when the kaboom chat it uses this chat type + case 5 -> translation = "chat.type.announcement"; // /say + case 6 -> translation = "chat.type.team.text"; // player that received /teammsg message + case 7 -> translation = "chat.type.team.sent"; // player that sent /teammsg message } return translation; @@ -156,7 +156,7 @@ public class ChatPlugin extends Bot.Listener { if (translation.equals("chat.type.team.text") || translation.equals("chat.type.team.sent")) { // ohio component = component.args( - Component.empty(), // TODO: fix team name.,., + Component.translatable("chat.square_brackets").args(bot.team.teamsByPlayer.get(bot.profile.getName()).displayName), playerMessage.displayName, playerMessage.contents ); @@ -198,7 +198,7 @@ public class ChatPlugin extends Bot.Listener { if (translation.equals("chat.type.team.text") || translation.equals("chat.type.team.sent")) { // ohio translatableComponent = translatableComponent.args( - Component.empty(), // TODO: fix team name.,., + Component.translatable("chat.square_brackets").args(bot.team.teamsByPlayer.get(bot.profile.getName()).displayName), name, content );