diff options
author | Walker Selby <git@walkerselby.com> | 2023-12-03 19:18:06 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 04:18:06 +0100 |
commit | 1cf1f68672d07767ed93150dd32094234eddd70c (patch) | |
tree | 6a57fdedca12fc61f688d4f1aa96e120866dc6ad /src/main/java/at/hannibal2/skyhanni/features/bingo | |
parent | 66fc6034b563b30854de121385d67140f605004e (diff) | |
download | skyhanni-1cf1f68672d07767ed93150dd32094234eddd70c.tar.gz skyhanni-1cf1f68672d07767ed93150dd32094234eddd70c.tar.bz2 skyhanni-1cf1f68672d07767ed93150dd32094234eddd70c.zip |
Internal Change: Remove String.matchRegex() function Usages (#641)
Code cleanup and removed .matchRegex() #641
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/bingo')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt index 9c2b4c1d6..f9020b77f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt @@ -21,7 +21,6 @@ import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher -import at.hannibal2.skyhanni.utils.StringUtils.matchRegex import at.hannibal2.skyhanni.utils.StringUtils.matches import at.hannibal2.skyhanni.utils.StringUtils.removeColor import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -38,6 +37,7 @@ class BingoNextStepHelper { private val collectionPattern = "Reach (?<amount>[0-9]+(?:,\\d+)*) (?<name>.*) Collection\\.".toPattern() private val crystalPattern = "Obtain a (?<name>\\w+) Crystal in the Crystal Hollows\\.".toPattern() private val skillPattern = "Obtain level (?<level>.*) in the (?<skill>.*) Skill.".toPattern() + private val crystalFoundPattern = " *§r§5§l✦ CRYSTAL FOUND §r§7\\(.§r§7/5§r§7\\)".toPattern() private val rhysTaskName = "30x Enchanted Minerals (Redstone, Lapis Lazuli, Coal) (for Rhys)" companion object { @@ -136,7 +136,7 @@ class BingoNextStepHelper { for (currentStep in currentSteps) { if (currentStep is ObtainCrystalStep) { - if (event.message.matchRegex(" *§r§5§l✦ CRYSTAL FOUND §r§7\\(.§r§7/5§r§7\\)")) { + crystalFoundPattern.matchMatcher(event.message) { nextMessageIsCrystal = true return } |