diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-17 12:28:53 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-17 12:28:53 +0100 |
commit | 00b8eb5ab91b2870f8263e1ac8e66cb973916b1c (patch) | |
tree | 78953b61dd0237b2c2740a66839b2b51dffb99b2 /src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt | |
parent | aee1bd5207a3193d05068fc046ef01e06fc1be67 (diff) | |
download | skyhanni-00b8eb5ab91b2870f8263e1ac8e66cb973916b1c.tar.gz skyhanni-00b8eb5ab91b2870f8263e1ac8e66cb973916b1c.tar.bz2 skyhanni-00b8eb5ab91b2870f8263e1ac8e66cb973916b1c.zip |
Random regex code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt index 29ce97471..cd7fa0c59 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt @@ -12,6 +12,7 @@ import at.hannibal2.skyhanni.utils.NEUInternalName import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher +import at.hannibal2.skyhanni.utils.StringUtils.matches import at.hannibal2.skyhanni.utils.StringUtils.removeColor import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -83,7 +84,7 @@ class CollectionAPI { val collectionValue = mutableMapOf<NEUInternalName, Long>() private val collectionTier0Pattern = "ยง7Progress to .* I: .*".toPattern() - fun isCollectionTier0(lore: List<String>) = lore.map { collectionTier0Pattern.matcher(it) }.any { it.matches() } + fun isCollectionTier0(lore: List<String>) = lore.any { collectionTier0Pattern.matches(it) } fun getCollectionCounter(internalName: NEUInternalName): Long? = collectionValue[internalName] } |