summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/chat
diff options
context:
space:
mode:
authorWalker Selby <git@walkerselby.com>2023-12-03 19:05:19 -0800
committerGitHub <noreply@github.com>2023-12-04 04:05:19 +0100
commit66fc6034b563b30854de121385d67140f605004e (patch)
treeee1124c0521f28f5e7bc929d1fdb4677de0682fd /src/main/java/at/hannibal2/skyhanni/features/chat
parented92dd80eda5b2441688e4c2808404304bd49a43 (diff)
downloadskyhanni-66fc6034b563b30854de121385d67140f605004e.tar.gz
skyhanni-66fc6034b563b30854de121385d67140f605004e.tar.bz2
skyhanni-66fc6034b563b30854de121385d67140f605004e.zip
Internal Change: Cleanup DungeonMilestonesDisplay & Remove matchRegex (#646)
Code cleanup in DungeonMilestoneDisplay. #646
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/chat')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt4
1 files changed, 2 insertions, 2 deletions
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) }