diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/FixNEUHeavyPearls.kt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/FixNEUHeavyPearls.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/FixNEUHeavyPearls.kt index 1608bb147..7afbf475c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/FixNEUHeavyPearls.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/FixNEUHeavyPearls.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName import io.github.moulberry.notenoughupdates.NotEnoughUpdates import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import kotlin.time.Duration.Companion.hours class FixNEUHeavyPearls { private val config get() = SkyHanniMod.feature.misc @@ -17,9 +18,11 @@ class FixNEUHeavyPearls { for (change in event.sackChanges) { if (change.internalName == heavyPearl && change.delta == 3) { - LorenzUtils.chat("§e[SkyHanni] Mark NEU Heavy Pearls as done.") - NotEnoughUpdates.INSTANCE.config.getProfileSpecific().dailyHeavyPearlCompleted = - System.currentTimeMillis() + val specific = NotEnoughUpdates.INSTANCE.config.getProfileSpecific() + if (System.currentTimeMillis() > specific.dailyHeavyPearlCompleted + 1.hours.inWholeMilliseconds) { + LorenzUtils.chat("§e[SkyHanni] Mark NEU Heavy Pearls as done.") + specific.dailyHeavyPearlCompleted = System.currentTimeMillis() + } } } } |