diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorTimer.kt | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt index c3d26c90f..6567397cc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt @@ -66,6 +66,8 @@ class GardenVisitorFeatures { private fun update() { display.clear() + if (!SkyHanniMod.feature.garden.visitorNeedsDisplay) return + val requiredItems = mutableMapOf<String, Int>() val newVisitors = mutableListOf<String>() for ((visitorName, visitor) in visitors) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorTimer.kt index 9ca5c4b13..6f39c3b63 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorTimer.kt @@ -23,11 +23,14 @@ class GardenVisitorTimer { var visitorsAmount = 0 var millis = 15 * 60_000L + var queueFull = false for (line in event.tabList) { var matcher = patternNextVisitor.matcher(line) if (matcher.matches()) { val rawTime = matcher.group(1) millis = TimeUtils.getMillis(rawTime) + } else if (line == " Next Visitor: §r§c§lQueue Full!") { + queueFull = true } matcher = patternVisitors.matcher(line) @@ -48,7 +51,8 @@ class GardenVisitorTimer { val visitorLabel = if (visitorsAmount == 1) "visitor" else "visitors" val formatDuration = TimeUtils.formatDuration(millis) - render = "§b$visitorsAmount $visitorLabel §f(Next in §e$formatDuration$extraSpeed§f)" + val next = if (queueFull) "§cQueue Full!" else "Next in §e$formatDuration$extraSpeed" + render = "§b$visitorsAmount $visitorLabel §f($next§f)" } @SubscribeEvent |