aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
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
commita04330a2c37bd3b12ee50281bfe9ae6008f3f65b (patch)
tree7695b7eb0fe5ae6e9254f924f4f456c02e320192 /src/main/java/at
parentdc66fe1509bde7dc3d7c786ff6fdb624c9150f8c (diff)
downloadskyhanni-a04330a2c37bd3b12ee50281bfe9ae6008f3f65b.tar.gz
skyhanni-a04330a2c37bd3b12ee50281bfe9ae6008f3f65b.tar.bz2
skyhanni-a04330a2c37bd3b12ee50281bfe9ae6008f3f65b.zip
Fixed bingo goal completed chat message does not auto update the bingo card.
Diffstat (limited to 'src/main/java/at')
-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