From 04f23d3a8136cf7b49269160f046fef82e86810f Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 3 May 2024 17:31:48 +0200 Subject: code cleanup --- .../java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') 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) -- cgit