From 2b8438d8aebb24aff6a59366a1e95c842917bc20 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 3 Mar 2023 22:57:51 +0100 Subject: Fixed bingo goal completed chat message does not auto update the bingo card. --- .../hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt index eef8ec213..f88ec4b59 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt @@ -28,6 +28,7 @@ class BingoCardDisplay { private var tick = 0 private val display = mutableListOf() private val config get() = SkyHanniMod.feature.bingo + private val goalCompletePattern = Pattern.compile("§6§lBINGO GOAL COMPLETE! §r§e(.*)") init { update() @@ -174,18 +175,9 @@ class BingoCardDisplay { if (!LorenzUtils.isBingoProfile) return if (!config.cardDisplay) return - val message = event.message - //§6§lBINGO GOAL COMPLETE! §r§eRaw Salmon Collector - val pattern = Pattern.compile("§6§lBINGO GOAL COMPLETE! §r§e(.*)") - - val matcher = pattern.matcher(message) - + val matcher = goalCompletePattern.matcher(event.message) if (matcher.matches()) { - val name = matcher.group(0) - println("name: '$name'") - for (goal in personalGoals) { - println("goal: '" + goal.displayName + "'") - } + val name = matcher.group(1) personalGoals.filter { it.displayName == name } .forEach { it.done = true -- cgit