From 2b82bd2742ec24067befcf0fa9fbd250a29f78fe Mon Sep 17 00:00:00 2001 From: Auxilor Date: Thu, 17 Feb 2022 16:45:35 +0000 Subject: [PATCH] Fixed placeholders --- .../src/main/kotlin/com/willfp/boosters/BoostersPlugin.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/boosters/BoostersPlugin.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/boosters/BoostersPlugin.kt index e41a21a..2206e9e 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/boosters/BoostersPlugin.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/boosters/BoostersPlugin.kt @@ -59,11 +59,11 @@ class BoostersPlugin : LibReforgePlugin(2036, 14269, "&e") { } } - val secondsLeft: Int + private val secondsLeft: Int get() { val endTime = ServerProfile.load().read(expiryTimeKey) val currentTime = System.currentTimeMillis() - return if (endTime < currentTime) { + return if (endTime < currentTime || activeBooster == null) { 0 } else { ((endTime - currentTime) / 1000).toInt()