aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/bingo
diff options
context:
space:
mode:
authorWalker Selby <git@walkerselby.com>2023-12-03 19:18:06 -0800
committerGitHub <noreply@github.com>2023-12-04 04:18:06 +0100
commit1cf1f68672d07767ed93150dd32094234eddd70c (patch)
tree6a57fdedca12fc61f688d4f1aa96e120866dc6ad /src/main/java/at/hannibal2/skyhanni/features/bingo
parent66fc6034b563b30854de121385d67140f605004e (diff)
downloadskyhanni-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.kt4
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
}