aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/BeaconPower.kt15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/BeaconPower.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/BeaconPower.kt
index 364a55d73..60ed3ed66 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/BeaconPower.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/BeaconPower.kt
@@ -108,15 +108,16 @@ object BeaconPower {
display = drawDisplay()
}
- private fun drawDisplay(): String {
- var text = "§eBeacon: "
- if (expiryTime.isInPast()) text += "§cNot active"
- else {
- text += "§b${expiryTime.timeUntil().format(maxUnits = 2)}"
- if (config.beaconPowerStat) text += " §7(" + (stat ?: "§cNo stat") + "§7)"
+ private fun drawDisplay(): String = buildString {
+ append("§eBeacon: ")
+ if (expiryTime.isInPast()) {
+ append("§cNot active")
+ } else {
+ append("§b${expiryTime.timeUntil().format(maxUnits = 2)}")
+ if (config.beaconPowerStat) append(" §7(${stat ?: "§cNo stat"}§7)")
}
- return text
}
+
private fun isEnabled() = LorenzUtils.inSkyBlock && config.beaconPower
}