diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-24 21:35:09 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-24 21:35:09 +0200 |
commit | 07bb3f5e91428822939805101306e17a16ce902c (patch) | |
tree | 2988b9a90c8b6aab3adf1a262569584f21d41334 /src/main/java | |
parent | adf1f80287ad26d382b75a326ed9e510fce4e372 (diff) | |
download | skyhanni-07bb3f5e91428822939805101306e17a16ce902c.tar.gz skyhanni-07bb3f5e91428822939805101306e17a16ce902c.tar.bz2 skyhanni-07bb3f5e91428822939805101306e17a16ce902c.zip |
Fixed jacob contest time shows one second too long
Diffstat (limited to 'src/main/java')
3 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/WikiCommand.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/WikiCommand.kt index d4769e651..4976c4d9f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/commands/WikiCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/commands/WikiCommand.kt @@ -21,8 +21,7 @@ class WikiCommand { event.isCanceled = true OSUtils.openBrowser("https://hypixel-skyblock.fandom.com/wiki/Hypixel_SkyBlock_Wiki") LorenzUtils.chat("§e[SkyHanni] Opening the Fandom Wiki..") - } - if (message.startsWith("/wiki ")) { + } else if (message.startsWith("/wiki ")) { event.isCanceled = true val search = packet.message.substring(6) LorenzUtils.chat("§e[SkyHanni] Searching the Fandom Wiki for §c$search") 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 db37a3c42..28bc69742 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 @@ -43,7 +43,7 @@ class JacobContestStatsSummary { val blocksPerSecond = (blocksBroken.toDouble() / durationInSeconds).round(2) val cropName = event.crop.cropName LorenzUtils.chat("§e[SkyHanni] Stats for $cropName Contest:") - val time = TimeUtils.formatDuration(duration) + val time = TimeUtils.formatDuration(duration - 999) LorenzUtils.chat("§e[SkyHanni] §7Blocks Broken in total: §e${blocksBroken.addSeparators()}") val color = getBlocksPerSecondColor(blocksPerSecond) LorenzUtils.chat("§e[SkyHanni] §7Average Blocks Per Second: $color$blocksPerSecond") diff --git a/src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt index 5aa6915bd..c95cdbeb7 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt @@ -41,7 +41,7 @@ object OSUtils { } } - fun KeyBinding.isActive() : Boolean { + fun KeyBinding.isActive(): Boolean { if (!Keyboard.isCreated()) return false try { if (Keyboard.isKeyDown(this.keyCode)) return true |