aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
index 391680208..ed87e6da7 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
@@ -38,6 +38,7 @@ import at.hannibal2.skyhanni.utils.OSUtils
import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
import at.hannibal2.skyhanni.utils.RenderUtils.renderString
import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems
+import at.hannibal2.skyhanni.utils.SimpleTimeMark
import at.hannibal2.skyhanni.utils.SoundUtils
import kotlinx.coroutines.launch
import net.minecraft.client.Minecraft
@@ -47,6 +48,7 @@ import net.minecraftforge.client.event.GuiScreenEvent
import net.minecraftforge.common.MinecraftForge
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.io.File
+import kotlin.time.Duration.Companion.seconds
class SkyHanniDebugsAndTests {
@@ -260,7 +262,15 @@ class SkyHanniDebugsAndTests {
LorenzUtils.chat("§eYou are not in Skyblock.")
}
+ private var lastManualContestDataUpdate = SimpleTimeMark.farPast()
+
fun clearContestData() {
+ if (lastManualContestDataUpdate.passedSince() < 30.seconds) {
+ LorenzUtils.userError("§cYou already cleared Jacob's Contest data recently!")
+ return
+ }
+ lastManualContestDataUpdate = SimpleTimeMark.now()
+
GardenNextJacobContest.contests.clear()
GardenNextJacobContest.fetchedFromElite = false
GardenNextJacobContest.isFetchingContests = true