Skip to content

Commit

Permalink
better solution
Browse files Browse the repository at this point in the history
  • Loading branch information
CalMWolfs committed Oct 14, 2024
1 parent c713941 commit 19e0ba5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ object ChatUtils {

return if (replaceSameMessage) {
text.send(getUniqueMessageIdForString(message))
true
chat(text, false)
} else {
chat(text)
}
}

fun chat(message: IChatComponent): Boolean {
fun chat(message: IChatComponent, send: Boolean = true): Boolean {
val formattedMessage = message.getFormattedTextCompat()
log.log(formattedMessage)

Expand All @@ -116,7 +116,7 @@ object ChatUtils {
return false
}

thePlayer.addChatMessage(message)
if (send) thePlayer.addChatMessage(message)
return true
}

Expand Down

0 comments on commit 19e0ba5

Please sign in to comment.