aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-04-06 10:20:15 +1100
committerGitHub <noreply@github.com>2024-04-06 01:20:15 +0200
commit4a76d31e9c1bef01b2d6617777f808ea03f117c2 (patch)
tree1f2801f41c220d6c62ecc697b80b7bf4113b69c9 /src/main/java/at/hannibal2/skyhanni
parent93a31c9fd9d4c4054783ec7e0ab6753f0d86d8bb (diff)
downloadskyhanni-4a76d31e9c1bef01b2d6617777f808ea03f117c2.tar.gz
skyhanni-4a76d31e9c1bef01b2d6617777f808ea03f117c2.tar.bz2
skyhanni-4a76d31e9c1bef01b2d6617777f808ea03f117c2.zip
Backend: Add isEnabled to BasketWaypoints (#1207)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/halloween/BasketWaypoints.kt13
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")