diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-04-17 23:08:50 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-04-17 23:08:50 +0200 |
commit | a1e0e192ba5c7e12bf2edbfadefe286d7503f188 (patch) | |
tree | 5d1ad0a75706857d58eb7e61e68bb58ca902e8a0 /src/main/java/at/hannibal2/skyhanni/api | |
parent | 9991622e4407d05cc140d6f30ff55c073cbffaa8 (diff) | |
download | skyhanni-a1e0e192ba5c7e12bf2edbfadefe286d7503f188.tar.gz skyhanni-a1e0e192ba5c7e12bf2edbfadefe286d7503f188.tar.bz2 skyhanni-a1e0e192ba5c7e12bf2edbfadefe286d7503f188.zip |
to Pattern
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/api')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt index c2782a3c1..074120d66 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt @@ -11,11 +11,10 @@ import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.StringUtils.removeColor import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import java.util.regex.Pattern class CollectionAPI { - private val counterPattern = Pattern.compile("(?:.*) §e(.*)§6\\/(?:.*)") - private val singleCounterPattern = Pattern.compile("§7Total Collected: §e(.*)") + private val counterPattern = "(?:.*) §e(.*)§6\\/(?:.*)".toPattern() + private val singleCounterPattern = "§7Total Collected: §e(.*)".toPattern() // private val hypixelApiHasWrongItems = listOf( // "WOOL", @@ -99,7 +98,7 @@ class CollectionAPI { companion object { private val collectionValue = mutableMapOf<String, Long>() - private val collectionTier0Pattern = Pattern.compile("§7Progress to .* I: .*") + private val collectionTier0Pattern = "§7Progress to .* I: .*".toPattern() fun isCollectionTier0(lore: List<String>) = lore.map { collectionTier0Pattern.matcher(it) }.any { it.matches() } |