From 623a9d213df3b1983a6dae416209518dd6904e2b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Fri, 24 May 2024 10:46:29 +0200 Subject: Improvement: Compact Hoppity Chat (#1748) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../at/hannibal2/skyhanni/test/command/TestChatCommand.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/test') 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 6d67a9ad0..e5ed69064 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt @@ -47,20 +47,24 @@ object TestChatCommand { } else ChatComponentText(text.replace("&", "§")) if (!isHidden) ChatUtils.chat("Testing message: §7${component.formattedText}", prefixColor = "§a") - test(component) + test(component, isHidden) } - private fun test(componentText: IChatComponent) { + private fun test(componentText: IChatComponent, isHidden: Boolean) { val message = componentText.formattedText.stripHypixelMessage() val event = LorenzChatEvent(message, componentText) event.postAndCatch() if (event.blockedReason != "") { - ChatUtils.chat("§cChat blocked: ${event.blockedReason}") + if (!isHidden) { + ChatUtils.chat("§cChat blocked: ${event.blockedReason}") + } } else { val finalMessage = event.chatComponent if (finalMessage.formattedText.stripHypixelMessage() != message) { - ChatUtils.chat("§eChat modified!") + if (!isHidden) { + ChatUtils.chat("§eChat modified!") + } } ChatUtils.chat(finalMessage) } -- cgit