aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/LimboTimeTracker.kt18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/LimboTimeTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/LimboTimeTracker.kt
index 7d4df6626..3fc6e734b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/LimboTimeTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/LimboTimeTracker.kt
@@ -30,11 +30,8 @@ class LimboTimeTracker {
if (!inLimbo) return
val passedSince = limboJoinTime.passedSince()
- val duration = passedSince.format()
if (passedSince > 5.seconds) {
- inLimbo = false
- if (!isEnabled()) return
- LorenzUtils.run { chat("§e[SkyHanni] You left the limbo after §b$duration") }
+ leaveLimbo()
}
}
@@ -43,9 +40,22 @@ class LimboTimeTracker {
if (!isEnabled()) return
if (!inLimbo) return
+ if (LorenzUtils.inSkyBlock) {
+ leaveLimbo()
+ return
+ }
+
val duration = limboJoinTime.passedSince().format()
config.showTimeInLimboPosition.renderString("§eIn limbo since §b$duration", posLabel = "Limbo Time Tracker")
}
+ private fun leaveLimbo() {
+ inLimbo = false
+ if (!isEnabled()) return
+ val passedSince = limboJoinTime.passedSince()
+ val duration = passedSince.format()
+ LorenzUtils.run { chat("§e[SkyHanni] You left the limbo after §b$duration") }
+ }
+
fun isEnabled() = config.showTimeInLimbo
} \ No newline at end of file