diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt index c923d1deed77..2187ab9a9c59 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 }