summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/test/command
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test/command')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt12
1 files changed, 8 insertions, 4 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 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)
}