summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/chat
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-04-04 04:56:02 +1100
committerGitHub <noreply@github.com>2024-04-03 19:56:02 +0200
commit1d051f3e1e35489989ca109f1493154641c23068 (patch)
treea3df2f70828ce87f487f43d6956718ab4c261838 /src/main/java/at/hannibal2/skyhanni/features/chat
parent14980034dd0fb71973e15c40e1a8a6f4eaa29895 (diff)
downloadskyhanni-1d051f3e1e35489989ca109f1493154641c23068.tar.gz
skyhanni-1d051f3e1e35489989ca109f1493154641c23068.tar.bz2
skyhanni-1d051f3e1e35489989ca109f1493154641c23068.zip
Fix: Tick event being called twice a tick (#1342)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/chat')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt3
1 files changed, 2 insertions, 1 deletions
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: ")
}