From 7c519944ab2ef783b873835af9c2b1e2afd5221b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 24 Nov 2024 22:00:11 +0100 Subject: [PATCH] fix formatting, typos and don't show both tab error messages at once, --- .../skyhanni/features/combat/ghosttracker/GhostTracker.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghosttracker/GhostTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghosttracker/GhostTracker.kt index 64f1de0df3e0..99a5eb34b7a2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghosttracker/GhostTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghosttracker/GhostTracker.kt @@ -31,6 +31,7 @@ import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.formatInt import at.hannibal2.skyhanni.utils.NumberUtil.formatLong +import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat import at.hannibal2.skyhanni.utils.RegexUtils.matchGroup import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher @@ -196,10 +197,10 @@ object GhostTracker { replaceSameMessage = true, ) } - if (!foundGhostBestiary && lastNoGhostBestiaryWidgetWarningTime.passedSince() > 1.minutes) { + if (TabWidget.BESTIARY.isActive && !foundGhostBestiary && lastNoGhostBestiaryWidgetWarningTime.passedSince() > 1.minutes) { lastNoGhostBestiaryWidgetWarningTime = SimpleTimeMark.now() ChatUtils.clickableChat( - "§Ghost bestiary not found in Bestiary Tab Widget! Ghost Tracker will not work properly without it.", + "§cGhost bestiary not found in Bestiary Tab Widget! Ghost Tracker will not work properly without it.", onClick = HypixelCommands::widget, "§eClick to run /widget!", replaceSameMessage = true, @@ -334,7 +335,7 @@ object GhostTracker { ), AVERAGE_MAGIC_FIND( "§7Average Magic Find: §b278.9", - { "§7Average Magic Find: §e${getAverageMagicFind(totalMagicFind, totalMagicFindKills)}" }, + { "§7Average Magic Find: §e${getAverageMagicFind(totalMagicFind, totalMagicFindKills).roundTo(1)}" }, ), BESTIARY_KILLS( "§7Bestiary Kills: §e 71,893",