aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestStatsSummary.kt5
1 files changed, 4 insertions, 1 deletions
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
}