From 66fc6034b563b30854de121385d67140f605004e Mon Sep 17 00:00:00 2001 From: Walker Selby Date: Sun, 3 Dec 2023 19:05:19 -0800 Subject: Internal Change: Cleanup DungeonMilestonesDisplay & Remove matchRegex (#646) Code cleanup in DungeonMilestoneDisplay. #646 --- src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/chat') diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt index b4cb10958..c73584d10 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.chat import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher +import at.hannibal2.skyhanni.utils.StringUtils.matches import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.StringUtils.trimWhiteSpaceAndResets import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -427,7 +427,7 @@ class ChatFilter { * @see messagesStartsWithMap */ private fun String.isPresent(key: String) = this in (messagesMap[key] ?: emptyList()) || - (patternsMap[key] ?: emptyList()).any { it.matchMatcher(this) { } != null } || + (patternsMap[key] ?: emptyList()).any { it.matches(this) } || (messagesContainsMap[key] ?: emptyList()).any { this.contains(it) } || (messagesStartsWithMap[key] ?: emptyList()).any { this.startsWith(it) } -- cgit