From cd3ddeaf53410f500769ed75fe5e044a68e74b90 Mon Sep 17 00:00:00 2001 From: SeRaid <77941535+SeRaid743@users.noreply.github.com> Date: Sat, 18 May 2024 09:26:06 +1200 Subject: [PATCH] added suggestions --- .../at/hannibal2/skyhanni/features/chat/ChatFilter.kt | 3 +-- .../event/lobby/waypoints/christmas/PresentWaypoints.kt | 9 ++------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt index 7b3774e2084a..c02a769e5766 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt @@ -353,8 +353,7 @@ class ChatFilter { "§.* §r§7has been promoted to §r§7\\[.*§r§7] §r§.*§r§7!".toPattern(), "§7Your §r§aRabbit Barn §r§7capacity has been increased to §r§a.* Rabbits§r§7!".toPattern(), "§7You will now produce §r§6.* Chocolate §r§7per click!".toPattern(), - "§7You upgraded to §r§d.*?§r§7!".toPattern() - + "§7You upgraded to §r§d.*?§r§7!".toPattern(), ) private val powderMiningMessages = listOf( "§aYou uncovered a treasure chest!", diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/christmas/PresentWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/christmas/PresentWaypoints.kt index ee4c5701bab1..2b0d9d72f760 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/christmas/PresentWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/christmas/PresentWaypoints.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.event.lobby.waypoints.christmas import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.HypixelData +import at.hannibal2.skyhanni.data.WinterAPI import at.hannibal2.skyhanni.data.jsonobjects.repo.EventWaypointsJson import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent @@ -19,7 +20,6 @@ import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText import at.hannibal2.skyhanni.utils.StringUtils.matches import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import java.time.LocalDate // todo: create abstract class for this and BasketWaypoints class PresentWaypoints { @@ -123,11 +123,6 @@ class PresentWaypoints { loadEventWaypoints(data.presents_entrances ?: error("'presents_entrances' is null in EventWaypoints!")) } - private fun isDecember(): Boolean { - val currentMonth = LocalDate.now().month - return currentMonth == java.time.Month.DECEMBER - } - private fun isEnabled(): Boolean = - LorenzUtils.inHypixelLobby && (config.allWaypoints || config.allEntranceWaypoints && isDecember()) + LorenzUtils.inHypixelLobby && (config.allWaypoints || config.allEntranceWaypoints && WinterAPI.isDecember()) }