diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt index 233aa46ea..13125c349 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt @@ -254,8 +254,9 @@ class FarmingWeightDisplay { listOf("§eClick here to load new data right now!"), onClick = recalculate ) + val showRankGoal = leaderboardPosition == -1 || leaderboardPosition > rankGoal var nextName = - if (leaderboardPosition == -1 || leaderboardPosition > rankGoal) "#$rankGoal" else nextPlayer.name + if (showRankGoal) "#$rankGoal" else nextPlayer.name val totalWeight = (localWeight + weight) var weightUntilOvertake = nextPlayer.weight - totalWeight @@ -298,11 +299,16 @@ class FarmingWeightDisplay { } else "" val weightFormat = LorenzUtils.formatDouble(weightUntilOvertake, 2) - return Renderable.clickAndHover( - "§e$weightFormat$timeFormat §7behind §b$nextName", - listOf("§eClick to open the Farming Profile of §b$nextName.") - ) { - openWebsite(nextName) + val text = "§e$weightFormat$timeFormat §7behind §b$nextName" + return if (showRankGoal) { + Renderable.string(text) + } else { + Renderable.clickAndHover( + text, + listOf("§eClick to open the Farming Profile of §b$nextName.") + ) { + openWebsite(nextName) + } } } |