diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-05-03 17:31:48 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-05-03 17:31:48 +0200 |
commit | 04f23d3a8136cf7b49269160f046fef82e86810f (patch) | |
tree | 8f7520d42101f6a6296c63b2465f305c15f34293 /src/main/java/at/hannibal2 | |
parent | ef7fcbfdf3bf954275e1d3b0c08c13214bff0f01 (diff) | |
download | skyhanni-04f23d3a8136cf7b49269160f046fef82e86810f.tar.gz skyhanni-04f23d3a8136cf7b49269160f046fef82e86810f.tar.bz2 skyhanni-04f23d3a8136cf7b49269160f046fef82e86810f.zip |
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt | 9 |
1 files changed, 4 insertions, 5 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 73645b6a8..4c23f5ed1 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt @@ -3,8 +3,8 @@ 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 at.hannibal2.skyhanni.utils.StringUtils.stripHypixelMessage import net.minecraft.util.ChatComponentText import net.minecraft.util.IChatComponent @@ -40,16 +40,15 @@ object TestChatCommand { } private fun test(componentText: IChatComponent) { - val event = LorenzChatEvent(LorenzUtils.stripVanillaMessage(componentText.formattedText), componentText) + val message = componentText.formattedText.stripHypixelMessage() + val event = LorenzChatEvent(message, componentText) event.postAndCatch() if (event.blockedReason != "") { ChatUtils.chat("§cChat blocked: ${event.blockedReason}") } else { val finalMessage = event.chatComponent - if (LorenzUtils.stripVanillaMessage(finalMessage.formattedText) != LorenzUtils.stripVanillaMessage( - componentText.formattedText) - ) { + if (finalMessage.formattedText.stripHypixelMessage() != message) { ChatUtils.chat("§eChat modified!") } ChatUtils.chatComponent(finalMessage) |