From 07df8a9cdc6fa9bbc4156c776e8863b1c1affbf1 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 21 Apr 2024 22:21:00 +0200 Subject: fix replacing too many chat messages. --- src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/test/command') diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt index 6a1fb52f8..0e719c4e1 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.test.command import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.utils.ChatUtils +import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.OSUtils import kotlinx.coroutines.launch import net.minecraft.util.ChatComponentText @@ -41,7 +42,7 @@ object TestChatCommand { ChatUtils.chat("§cChat blocked: ${event.blockedReason}") } else { val finalMessage = event.chatComponent.formattedText - if (finalMessage != message) { + if (LorenzUtils.stripVanillaMessage(finalMessage) != LorenzUtils.stripVanillaMessage(message)) { ChatUtils.chat("§eChat modified!") } ChatUtils.chat(finalMessage, false) -- cgit