From 8d2bb2c80edbfe687b4e020330f882b3a364d088 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 16 Jun 2023 11:55:19 +0200 Subject: Fixed bug that Player Chat Filter didn't work most of the time. Fixes 235 --- .../features/chat/playerchat/PlayerChatModifier.kt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt index a8b4d808c..c9311d11e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt @@ -60,14 +60,6 @@ class PlayerChatModifier { private fun cutMessage(input: String): String { var string = input - if (SkyHanniMod.feature.chat.chatFilter) { - if (string.contains("§r§f: ")) { - if (PlayerChatFilter.shouldChatFilter(string)) { - string = string.replace("§r§f: ", "§r§7: ") - } - } - } - if (SkyHanniMod.feature.chat.playerRankHider) { for (pattern in patterns) { string = string.replace(pattern, "§b$1") @@ -82,6 +74,14 @@ class PlayerChatModifier { } } + if (SkyHanniMod.feature.chat.chatFilter) { + if (string.contains("§r§f: ")) { + if (PlayerChatFilter.shouldChatFilter(string)) { + string = string.replace("§r§f: ", "§r§7: ") + } + } + } + if (SkyHanniMod.feature.markedPlayers.highlightInChat) { for (markedPlayer in MarkedPlayerManager.playerNamesToMark) { string = string.replace(markedPlayer, "§e$markedPlayer§r") -- cgit