aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorLuna <luna@alexia.lol>2024-05-18 02:57:18 +0200
committerGitHub <noreply@github.com>2024-05-18 02:57:18 +0200
commiteb068f4d7d784239ac17e0de235f37e61da65973 (patch)
tree4987c02c04b23381163bfb28b42678496bc96d91 /src/main/java/at
parent29b7984d878cb97645b13952db9876e19d9181fb (diff)
downloadskyhanni-eb068f4d7d784239ac17e0de235f37e61da65973.tar.gz
skyhanni-eb068f4d7d784239ac17e0de235f37e61da65973.tar.bz2
skyhanni-eb068f4d7d784239ac17e0de235f37e61da65973.zip
Fix: Volcano Explosivity Display (#1821)
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/VolcanoExplosivityDisplay.kt16
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
+ }
}
}