aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/test
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-05-24 10:46:29 +0200
committerGitHub <noreply@github.com>2024-05-24 10:46:29 +0200
commit623a9d213df3b1983a6dae416209518dd6904e2b (patch)
tree222b098e4826dbc009df29896592e74690b61870 /src/main/java/at/hannibal2/skyhanni/test
parent17ac70d7cd8416324acfffcde656930b4e9ae612 (diff)
downloadskyhanni-623a9d213df3b1983a6dae416209518dd6904e2b.tar.gz
skyhanni-623a9d213df3b1983a6dae416209518dd6904e2b.tar.bz2
skyhanni-623a9d213df3b1983a6dae416209518dd6904e2b.zip
Improvement: Compact Hoppity Chat (#1748)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test')
-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)
}