diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-09 12:46:20 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-09 12:46:20 +0100 |
commit | aff4c2a100b4fcfbfcaac625728f55fe68dc6872 (patch) | |
tree | abfc0933dcd4adbc096ec856aaff753d2da57fb0 /src/main/java/at/hannibal2/skyhanni/features/misc | |
parent | bba11f79532a7c70855af1ee00bff1c966fdf62d (diff) | |
download | skyhanni-aff4c2a100b4fcfbfcaac625728f55fe68dc6872.tar.gz skyhanni-aff4c2a100b4fcfbfcaac625728f55fe68dc6872.tar.bz2 skyhanni-aff4c2a100b4fcfbfcaac625728f55fe68dc6872.zip |
Hide Winter Island close timer during the month of December.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/TimeFeatures.kt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/TimeFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/TimeFeatures.kt index 4298edf21..021dd0ef6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/TimeFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/TimeFeatures.kt @@ -9,10 +9,12 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.RecalculatingValue import at.hannibal2.skyhanni.utils.RenderUtils.renderString import at.hannibal2.skyhanni.utils.SimpleTimeMark.Companion.asTimeMark +import at.hannibal2.skyhanni.utils.TimeUtils import at.hannibal2.skyhanni.utils.TimeUtils.format import io.github.moulberry.notenoughupdates.util.SkyBlockTime import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.text.SimpleDateFormat +import java.time.Month import kotlin.time.Duration.Companion.days import kotlin.time.Duration.Companion.seconds @@ -38,6 +40,7 @@ class TimeFeatures { } if (winterConfig.islandCloseTime && IslandType.WINTER.isInIsland()) { + if (TimeUtils.getCurrentLocalDate().month == Month.DECEMBER) return val timeTillNextYear = startOfNextYear.getValue().timeUntil() val alreadyInNextYear = timeTillNextYear > 5.days val text = if (alreadyInNextYear) { |