diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-23 02:09:09 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-23 02:09:09 +0100 |
commit | 57a25df8326aa525cb35b84ca0dcce6985da2c5e (patch) | |
tree | 9a70768d8d1fba6a7ad00d8a82c6e844dbaebcb6 /src/main | |
parent | 50c17660eed26c02b5db1930f60a8625dc151246 (diff) | |
download | skyhanni-57a25df8326aa525cb35b84ca0dcce6985da2c5e.tar.gz skyhanni-57a25df8326aa525cb35b84ca0dcce6985da2c5e.tar.bz2 skyhanni-57a25df8326aa525cb35b84ca0dcce6985da2c5e.zip |
Made bestiary compact message cleaner.
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt index dcf532668..48d8b0e8c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt @@ -54,7 +54,7 @@ class CompactBestiaryChatMessage { } inBestiary = true blockedLines = 0 - bestiaryDescription.add(message.trim()) + bestiaryDescription.add(message) } else if (inBestiary) { event.blockedReason = "bestiary" blockedLines++ @@ -65,8 +65,9 @@ class CompactBestiaryChatMessage { if (message == border) { inBestiary = false - val title = bestiaryDescription[1] - LorenzUtils.hoverableChat("§6§lBESTIARY §r$title", bestiaryDescription.dropLast(1), command, false) + val list = bestiaryDescription.map { it.replace("§f", "").trim() } + val title = list[1] + LorenzUtils.hoverableChat("§6§lBESTIARY §r$title", list.dropLast(1), command, false) bestiaryDescription.clear() acceptMoreDescription = true @@ -80,7 +81,7 @@ class CompactBestiaryChatMessage { milestoneMessage = it.groups[1]!!.value } if (acceptMoreDescription) { - bestiaryDescription.add(message.trim()) + bestiaryDescription.add(message) } } } |