From 1d051f3e1e35489989ca109f1493154641c23068 Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Thu, 4 Apr 2024 04:56:02 +1100 Subject: Fix: Tick event being called twice a tick (#1342) --- .../hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/chat') 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 a8b7cdada..fa7c55b51 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 @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.features.dungeon.DungeonMilestonesDisplay import at.hannibal2.skyhanni.features.misc.MarkedPlayerManager +import at.hannibal2.skyhanni.utils.StringUtils.matches import net.minecraft.util.ChatComponentText import net.minecraft.util.IChatComponent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -68,7 +69,7 @@ class PlayerChatModifier { string = string.replace("§[7ab6]((?:\\w+){2,16}) (§.)", "§b$1 $2") // TODO remove workaround - if (!DungeonMilestonesDisplay.isMilestoneMessage(input)) { + if (!DungeonMilestonesDisplay.milestonePattern.matches(input)) { // all players same color in chat string = string.replace("§r§7: ", "§r§f: ") } -- cgit