From 84ec0487a971746256e52710eee92b8c2e18ac32 Mon Sep 17 00:00:00 2001 From: Walker Selby Date: Sun, 3 Dec 2023 18:29:53 -0800 Subject: Fix Consecutive Spaces in RegEx (#665) Fix Consecutive Spaces in RegEx. #665 --- .../java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt | 4 ++-- .../at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt | 2 +- .../java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt | 2 +- .../at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt index e686191aa..91e7a1745 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt @@ -15,8 +15,8 @@ class CompactBingoChat { private var inCollectionLevelUp = false private var collectionLevelUpLastLine: String? = null private var newArea = 0//0 = nothing, 1 = after first message, 2 = after second message - private val healthPattern = " §r§7§8\\+§a.* §c❤ Health".toPattern() - private val strengthPattern = " §r§7§8\\+§a. §c❁ Strength".toPattern() + private val healthPattern = " {3}§r§7§8\\+§a.* §c❤ Health".toPattern() + private val strengthPattern = " {3}§r§7§8\\+§a. §c❁ Strength".toPattern() // TODO USE SH-REPO @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt index e660fe504..fa273ebb3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt @@ -16,7 +16,7 @@ import java.util.regex.Pattern class GardenCropMilestoneFix { private val tabListPattern = " Milestone: §r§a(?.*) (?.*): §r§3(?.*)%".toPattern() - private val levelUpPattern = Pattern.compile(" §r§b§lGARDEN MILESTONE §3(?.*) §8(?:.*)➜§3(?.*)") + private val levelUpPattern = Pattern.compile(" {2}§r§b§lGARDEN MILESTONE §3(?.*) §8(?:.*)➜§3(?.*)") private val tabListCropProgress = mutableMapOf() diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt index 728896e22..df8c47740 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt @@ -43,7 +43,7 @@ class SlayerQuestWarning { } //no auto slayer - if (message.matchRegex(" §r§5§l» §r§7Talk to Maddox to claim your (.+) Slayer XP!")) { + if (message.matchRegex(" {3}§r§5§l» §r§7Talk to Maddox to claim your (.+) Slayer XP!")) { needNewQuest("You have no Auto-Slayer active!") } if (message == " §r§a§lSLAYER QUEST COMPLETE!") { diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt index b26fd4c09..239935368 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt @@ -28,7 +28,7 @@ class SlayerRngMeterDisplay { private val config get() = SkyHanniMod.feature.slayer.rngMeterDisplay private var display = "" private val inventoryNamePattern = "(?.*) RNG Meter".toPattern() - private val updatePattern = " §dRNG Meter §f- §d(?.*) Stored XP".toPattern() + private val updatePattern = " {3}§dRNG Meter §f- §d(?.*) Stored XP".toPattern() private val changedItemPattern = "§aYou set your §r.* RNG Meter §r§ato drop §r.*§a!".toPattern() private var lastItemDroppedTime = 0L -- cgit