diff options
| author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-10-26 13:18:15 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-26 04:18:15 +0200 |
| commit | 9d21e7b150a88df224bd35e702bf71e456019db1 (patch) | |
| tree | 8443c2215cade5dae4611bb7ba3d0e979be6cc5a | |
| parent | 697e9e2dd6e5bb1d32e5b330623199099d9750bf (diff) | |
| download | SkyHanni-9d21e7b150a88df224bd35e702bf71e456019db1.tar.gz SkyHanni-9d21e7b150a88df224bd35e702bf71e456019db1.tar.bz2 SkyHanni-9d21e7b150a88df224bd35e702bf71e456019db1.zip | |
Backend: Fix code in PlayerChatManager (#2756)
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt index 2529e7ff1..eb48bb4e9 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt @@ -206,24 +206,20 @@ object PlayerChatManager { private fun sendSystemMessage(event: LorenzChatEvent) { with(SystemMessageEvent(event.message, event.chatComponent)) { - val cancelled = postAndCatch() - event.handleChat(cancelled, blockedReason, chatComponent) + postAndCatch() + event.handleChat(blockedReason, chatComponent) } } private fun AbstractChatEvent.postChat(event: LorenzChatEvent) { - val cancelled = postAndCatch() - event.handleChat(cancelled, blockedReason, chatComponent) + postAndCatch() + event.handleChat(blockedReason, chatComponent) } private fun LorenzChatEvent.handleChat( - cancelled: Boolean, blockedReason: String?, chatComponent: IChatComponent, ) { - if (cancelled) { - this.cancel() - } blockedReason?.let { this.blockedReason = it } |
