diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-04-21 22:21:00 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-04-21 22:21:00 +0200 |
commit | 07df8a9cdc6fa9bbc4156c776e8863b1c1affbf1 (patch) | |
tree | a2741fd3dd23156c00d7b22845c3dd1f9a582ed0 /src/main/java/at/hannibal2/skyhanni/test | |
parent | 7aef79228e1acfbf6d2f6d73a1b5b18ec956eab4 (diff) | |
download | skyhanni-07df8a9cdc6fa9bbc4156c776e8863b1c1affbf1.tar.gz skyhanni-07df8a9cdc6fa9bbc4156c776e8863b1c1affbf1.tar.bz2 skyhanni-07df8a9cdc6fa9bbc4156c776e8863b1c1affbf1.zip |
fix replacing too many chat messages.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt | 3 |
1 files changed, 2 insertions, 1 deletions
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) |