diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/halloween/BasketWaypoints.kt | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/halloween/BasketWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/halloween/BasketWaypoints.kt index 1eae1e8a6..da267da07 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/halloween/BasketWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/halloween/BasketWaypoints.kt @@ -25,8 +25,7 @@ class BasketWaypoints { if (!config.allWaypoints && !config.allEntranceWaypoints) return if (!isHalloween) return - if (!HypixelData.hypixelLive) return // don't show outside live hypixel network (it's disabled on alpha) - if (LorenzUtils.inSkyBlock) return + if (!isEnabled()) return val message = event.message if (message.startsWith("§a§lYou found a Candy Basket! §r") || message == "§cYou already found this Candy Basket!") { @@ -41,8 +40,7 @@ class BasketWaypoints { @SubscribeEvent fun onTick(event: LorenzTickEvent) { if (!config.allWaypoints && !config.allEntranceWaypoints) return - if (!HypixelData.hypixelLive) return // don't show outside live hypixel network (it's disabled on alpha) - if (LorenzUtils.inSkyBlock) return + if (!isEnabled()) return if (event.repeatSeconds(1)) { isHalloween = checkScoreboardHalloweenSpecific() @@ -61,8 +59,7 @@ class BasketWaypoints { @SubscribeEvent fun onRenderWorld(event: LorenzRenderWorldEvent) { - if (!HypixelData.hypixelLive) return // don't show outside live hypixel network (it's disabled on alpha) - if (LorenzUtils.inSkyBlock) return + if (!isEnabled()) return if (!isHalloween) return if (config.allWaypoints) { @@ -81,8 +78,6 @@ class BasketWaypoints { } return } - - if (LorenzUtils.skyBlockArea == "?") return } private fun Basket.shouldShow(): Boolean { @@ -101,6 +96,8 @@ class BasketWaypoints { return a && b && c } + private fun isEnabled() = HypixelData.hypixelLive && !LorenzUtils.inSkyBlock + @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { event.move(13, "event.halloweenBasket", "event.lobbyWaypoints.halloweenBasket") |