From 57a25df8326aa525cb35b84ca0dcce6985da2c5e Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 23 Dec 2023 02:09:09 +0100 Subject: Made bestiary compact message cleaner. --- .../skyhanni/features/chat/CompactBestiaryChatMessage.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main') 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) } } } -- cgit