diff options
author | Luna <luna@alexia.lol> | 2024-05-18 02:57:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-18 02:57:18 +0200 |
commit | eb068f4d7d784239ac17e0de235f37e61da65973 (patch) | |
tree | 4987c02c04b23381163bfb28b42678496bc96d91 | |
parent | 29b7984d878cb97645b13952db9876e19d9181fb (diff) | |
download | skyhanni-eb068f4d7d784239ac17e0de235f37e61da65973.tar.gz skyhanni-eb068f4d7d784239ac17e0de235f37e61da65973.tar.bz2 skyhanni-eb068f4d7d784239ac17e0de235f37e61da65973.zip |
Fix: Volcano Explosivity Display (#1821)
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/nether/VolcanoExplosivityDisplay.kt | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/VolcanoExplosivityDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/VolcanoExplosivityDisplay.kt index 120f8b914..d5a518e67 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/VolcanoExplosivityDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/VolcanoExplosivityDisplay.kt @@ -16,22 +16,20 @@ class VolcanoExplosivityDisplay { private val config get() = SkyHanniMod.feature.crimsonIsle private val patternGroup = RepoPattern.group("crimson.volcano") - private val headerPattern by patternGroup.pattern( - "header.tablistline", - "(?:§.)*Volcano Explosivity:(?:[\\S ]+)*" - ) private val statusPattern by patternGroup.pattern( - "status.tablistline", - " *(?<status>(?:§.)*\\S+)" + "tablistline", + " *Volcano: (?<status>(?:§.)*\\S+)" ) private var display = "" @SubscribeEvent fun onTabListUpdate(event: TabListUpdateEvent) { if (!isEnabled()) return - val text = event.tabList.nextAfter({ headerPattern.matches(it) }) ?: return - statusPattern.matchMatcher(text) { - display = "§bVolcano Explosivity§7: ${group("status")}" + for (line in event.tabList) { + statusPattern.matchMatcher(line) { + display = "§bVolcano Explosivity§7: ${group("status")}" + break + } } } |