From d6d899e8929e8caeb40e2099d13dd3425129d5e8 Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Mon, 25 Mar 2024 00:46:00 +1100 Subject: Fix: Serverid error (#1262) --- .../skyhanni/features/mining/eventtracker/MiningEventTracker.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/mining') diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt index 4d4b59b6f..e4d8e31a3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt @@ -47,7 +47,6 @@ class MiningEventTracker { private val defaultCooldown = 1.minutes - private var lastWorldSwitch = SimpleTimeMark.farPast() private var eventEndTime = SimpleTimeMark.farPast() private var lastSentEvent: MiningEventType? = null @@ -55,7 +54,6 @@ class MiningEventTracker { @SubscribeEvent fun onWorldChange(event: LorenzWorldChangeEvent) { - lastWorldSwitch = SimpleTimeMark.farPast() eventEndTime = SimpleTimeMark.farPast() lastSentEvent = null } @@ -63,7 +61,7 @@ class MiningEventTracker { @SubscribeEvent fun onBossbarChange(event: BossbarUpdateEvent) { if (!LorenzUtils.inAdvancedMiningIsland()) return - if (lastWorldSwitch.passedSince() < 5.seconds) return + if (LorenzUtils.lastWorldSwitch.passedSince() < 5.seconds) return if (!eventEndTime.isInPast()) { return } -- cgit