aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-03 22:57:51 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-03 22:57:51 +0100
commit2b8438d8aebb24aff6a59366a1e95c842917bc20 (patch)
tree7695b7eb0fe5ae6e9254f924f4f456c02e320192
parentd6dbc597c93af9bcdd3f691e167a9973a97e40a4 (diff)
downloadSkyHanni-2b8438d8aebb24aff6a59366a1e95c842917bc20.tar.gz
SkyHanni-2b8438d8aebb24aff6a59366a1e95c842917bc20.tar.bz2
SkyHanni-2b8438d8aebb24aff6a59366a1e95c842917bc20.zip
Fixed bingo goal completed chat message does not auto update the bingo card.
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt14
1 files 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<String>()
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