aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-25 13:45:55 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-25 13:45:55 +0200
commit9d6cfa7e352aa0d35d90d49ffa2813f921bece17 (patch)
tree5e6633cfe3bee8664521373b2e595e69df02d58f /src/main/java/at/hannibal2
parentda07d19354c53a0145bc3495b041419d8c2ab3fd (diff)
downloadskyhanni-9d6cfa7e352aa0d35d90d49ffa2813f921bece17.tar.gz
skyhanni-9d6cfa7e352aa0d35d90d49ffa2813f921bece17.tar.bz2
skyhanni-9d6cfa7e352aa0d35d90d49ffa2813f921bece17.zip
Added color
Diffstat (limited to 'src/main/java/at/hannibal2')
-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
}