From d7066762c7084a00d9f193b67317a3ccf732bca2 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 23 Mar 2023 21:15:00 +0100 Subject: Hopefully fixed farming weight leaderboard pass next player display --- .../java/at/hannibal2/skyhanni/features/garden/EliteFarmingWeight.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/EliteFarmingWeight.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/EliteFarmingWeight.kt index 9e8332209..8aa187fad 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/EliteFarmingWeight.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/EliteFarmingWeight.kt @@ -153,19 +153,21 @@ class EliteFarmingWeight { private fun getETA(): String { if (weight < 0) return "" + val nextName = if (leaderboardPosition == -1) "#1000" else nextPlayerName val totalWeight = (localWeight + weight) val weightUntilOvertake = nextPlayerWeight - totalWeight if (weightUntilOvertake < 0) { if (!hasPassedNext) { + LorenzUtils.chat("§e[SkyHanni] You passed §b$nextName §ein the Farming Weight Leaderboard!") if (leaderboardPosition == -1) { leaderboardPosition = 1000 } else { leaderboardPosition-- } - nextPlayerWeight = 0.0 hasPassedNext = true } + return "§cWaiting for leaderboard update..." } if (nextPlayerWeight == 0.0) { @@ -177,7 +179,6 @@ class EliteFarmingWeight { val format = LorenzUtils.formatDouble(weightUntilOvertake, 2) // TODO Maybe add next player name? - val nextName = if (leaderboardPosition == -1) "#1000" else nextPlayerName return "§e$format §7(§b$timeFormat§7) §7behind §b$nextName" } -- cgit