From c19a902d2ef4aa93ff2d3cc93230f067e9315b71 Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Tue, 20 Feb 2024 00:59:39 +1100 Subject: Created ActionBarUpdateEvent and used it. #977 --- .../at/hannibal2/skyhanni/features/rift/everywhere/RiftTimer.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/rift') diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftTimer.kt index e7f8ad5a1..c995fa405 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftTimer.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.features.rift.everywhere +import at.hannibal2.skyhanni.events.ActionBarUpdateEvent import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzActionBarEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.utils.ConditionalUtils @@ -36,10 +36,11 @@ class RiftTimer { currentTime = 0 } + //todo use ActionBarValueUpdateEvent @SubscribeEvent - fun onActionBar(event: LorenzActionBarEvent) { + fun onActionBarUpdate(event: ActionBarUpdateEvent) { if (!isEnabled()) return - for (entry in event.message.split(" ")) { + for (entry in event.actionBar.split(" ")) { timePattern.matchMatcher(entry) { val color = group("color") val newTime = getTime(group("time")) -- cgit