From 6639ad9ad130509c1e537cded514ca3377883cfc Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 23 Oct 2024 18:25:44 +0200 Subject: less spam, more replace --- src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt | 4 +++- .../at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt index ad119804b..ec5b0a4a8 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt @@ -91,7 +91,7 @@ object ProfileStorageData { if (it.multipleProfiles && !hypixelDataLoaded) return } - if (noTabListTime.passedSince() < 5.seconds) return + if (noTabListTime.passedSince() < 2.seconds) return noTabListTime = SimpleTimeMark.now() val foundSkyBlockTabList = TabListData.getTabList().any { it.contains("§b§lArea:") } if (foundSkyBlockTabList) { @@ -102,11 +102,13 @@ object ProfileStorageData { HypixelCommands.widget() }, "§eClick to run /widget!", + replaceSameMessage = true, ) } else { ChatUtils.chat( "§cExtra Information from Tab list not found! " + "Enable it: SkyBlock Menu ➜ Settings ➜ Personal ➜ User Interface ➜ Player List Info", + replaceSameMessage = true, ) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt index a6331db11..1ccb3d17f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt @@ -34,7 +34,6 @@ import net.minecraft.item.ItemStack import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.math.floor import kotlin.math.log10 -import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.seconds @SkyHanniModule @@ -223,22 +222,24 @@ object FarmingFortuneDisplay { if (!GardenAPI.inGarden()) return if (event.isMod(2)) update() if (gardenJoinTime.passedSince() > 5.seconds && !foundTabUniversalFortune && !gardenJoinTime.isFarPast()) { - if (lastUniversalFortuneMissingError.passedSince() < 1.minutes) return + if (lastUniversalFortuneMissingError.passedSince() < 20.seconds) return ChatUtils.clickableChat( "§cCan not read Farming Fortune from tab list! Open /widget, enable the Stats Widget and " + "show the Farming Fortune stat, also give the widget enough priority.", onClick = { HypixelCommands.widget() }, "§eClick to run /widget!", + replaceSameMessage = true, ) lastUniversalFortuneMissingError = SimpleTimeMark.now() } if (firstBrokenCropTime.passedSince() > 10.seconds && !foundTabCropFortune && !firstBrokenCropTime.isFarPast()) { - if (lastCropFortuneMissingError.passedSince() < 1.minutes || !GardenAPI.isCurrentlyFarming()) return + if (lastCropFortuneMissingError.passedSince() < 20.seconds || !GardenAPI.isCurrentlyFarming()) return ChatUtils.clickableChat( "§cCan not read Crop Fortune from tab list! Open /widget, enable the Stats Widget and " + "show latest Crop Fortune, also give the widget enough priority.", onClick = { HypixelCommands.widget() }, "§eClick to run /widget!", + replaceSameMessage = true, ) lastCropFortuneMissingError = SimpleTimeMark.now() } -- cgit