Skip to content

Commit

Permalink
less spam, more replace
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 committed Oct 23, 2024
1 parent ab0b725 commit 6639ad9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
}
Expand Down

0 comments on commit 6639ad9

Please sign in to comment.