diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt index c923d1dee..2187ab9a9 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt @@ -92,15 +92,15 @@ object ChatUtils { ): Boolean { val text = ChatComponentText(message) - if (replaceSameMessage) { + return if (replaceSameMessage) { text.send(getUniqueMessageIdForString(message)) + chat(text, false) } else { chat(text) } - return chat(text) } - fun chat(message: IChatComponent): Boolean { + fun chat(message: IChatComponent, send: Boolean = true): Boolean { val formattedMessage = message.getFormattedTextCompat() log.log(formattedMessage) @@ -116,7 +116,7 @@ object ChatUtils { return false } - thePlayer.addChatMessage(message) + if (send) thePlayer.addChatMessage(message) return true } |