From 9d6cfa7e352aa0d35d90d49ffa2813f921bece17 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 25 May 2023 13:45:55 +0200 Subject: Added color --- .../skyhanni/features/garden/contest/JacobContestStatsSummary.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2') diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestStatsSummary.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestStatsSummary.kt index ecd8f5f72..db37a3c42 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestStatsSummary.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestStatsSummary.kt @@ -45,7 +45,8 @@ class JacobContestStatsSummary { LorenzUtils.chat("§e[SkyHanni] Stats for $cropName Contest:") val time = TimeUtils.formatDuration(duration) LorenzUtils.chat("§e[SkyHanni] §7Blocks Broken in total: §e${blocksBroken.addSeparators()}") - LorenzUtils.chat("§e[SkyHanni] §7Average Blocks Per Second: §c$blocksPerSecond") + val color = getBlocksPerSecondColor(blocksPerSecond) + LorenzUtils.chat("§e[SkyHanni] §7Average Blocks Per Second: $color$blocksPerSecond") LorenzUtils.chat("§e[SkyHanni] §7Participated for §b$time") } FarmingContestPhase.CHANGE -> { @@ -56,5 +57,7 @@ class JacobContestStatsSummary { blocksBroken = 0 } + private fun getBlocksPerSecondColor(blocksPerSecond: Double) = if (blocksPerSecond > 19) "§c" else "§a" + fun isEnabled() = GardenAPI.inGarden() && config.jacobContestSummary } -- cgit