diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-05-11 13:17:27 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-05-11 13:17:27 +0200 |
commit | 0addf9dd07808091040e3f8004ee1710cf69812b (patch) | |
tree | 114c8dfb67454ccc48e2a0a6b2087a6d2e6ed4d0 /src/main/java/at/hannibal2 | |
parent | a7bebf678bd9d16027b84403c3e39a102bb670ef (diff) | |
download | skyhanni-0addf9dd07808091040e3f8004ee1710cf69812b.tar.gz skyhanni-0addf9dd07808091040e3f8004ee1710cf69812b.tar.bz2 skyhanni-0addf9dd07808091040e3f8004ee1710cf69812b.zip |
Added optional parameter "hidden" -s to /shtestmessage
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt | 6 |
1 files changed, 4 insertions, 2 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 39740a8ec..759cbd9e7 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt @@ -11,8 +11,10 @@ object TestChatCommand { LorenzUtils.chat("§c[SkyHanni] Specify a chat message to test") return } - val rawMessage = args.toList().joinToString(" ") - LorenzUtils.chat("§a[SkyHanni] testing message: §7$rawMessage") + val hidden = args.last() == "-s" + var rawMessage = args.toList().joinToString(" ") + if (!hidden) LorenzUtils.chat("§a[SkyHanni] testing message: §7$rawMessage") + if (hidden) rawMessage = rawMessage.replace(" -s", "") val formattedMessage = rawMessage.replace("&", "§") LorenzUtils.chat(formattedMessage) MinecraftForge.EVENT_BUS.post(ClientChatReceivedEvent(0, ChatComponentText(formattedMessage))) |