From 17be307d56bab4f50006bb5487e4bf513ef8ee08 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Sun, 25 Aug 2024 23:50:04 +0200 Subject: Fix: Hoppity Requirement (#2398) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../skyhanni/features/event/hoppity/HoppityCollectionStats.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt index e9a8bb687..f4d98e782 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt @@ -134,11 +134,13 @@ object HoppityCollectionStats { @SubscribeEvent fun onInventoryOpen(event: InventoryFullyOpenedEvent) { - if (!isEnabled()) return + if (!(LorenzUtils.inSkyBlock)) return if (!pagePattern.matches(event.inventoryName)) return inInventory = true - display = buildDisplay(event) + if (config.hoppityCollectionStats) { + display = buildDisplay(event) + } } @SubscribeEvent @@ -150,6 +152,7 @@ object HoppityCollectionStats { @SubscribeEvent fun onBackgroundDraw(event: GuiRenderEvent.ChestGuiOverlayRenderEvent) { if (!inInventory) return + if (!config.hoppityCollectionStats) return config.hoppityStatsPosition.renderRenderables( display, @@ -367,8 +370,6 @@ object HoppityCollectionStats { fun hasFoundRabbit(rabbit: String): Boolean = loggedRabbits.containsKey(rabbit) - private fun isEnabled() = LorenzUtils.inSkyBlock && config.hoppityCollectionStats - enum class RabbitCollectionRarity( val displayName: String, val item: NEUInternalName, -- cgit