diff options
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt index f922ce497..fdd4d23d2 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt @@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent +import at.hannibal2.skyhanni.events.ScoreboardUpdateEvent import at.hannibal2.skyhanni.events.TabListUpdateEvent import at.hannibal2.skyhanni.events.WidgetUpdateEvent import at.hannibal2.skyhanni.events.minecraft.ClientDisconnectEvent @@ -113,6 +114,7 @@ object HypixelData { ) private var lastLocRaw = SimpleTimeMark.farPast() + private var hasScoreboardUpdated = false var hypixelLive = false var hypixelAlpha = false @@ -272,6 +274,12 @@ object HypixelData { locrawData = null skyBlockArea = null skyBlockAreaWithSymbol = null + hasScoreboardUpdated = false + } + + @SubscribeEvent + fun onScoreboardUpdate(event: ScoreboardUpdateEvent) { + hasScoreboardUpdated = true } @SubscribeEvent @@ -378,6 +386,7 @@ object HypixelData { } private fun checkHypixel() { + if (!hasScoreboardUpdated) return val mc = Minecraft.getMinecraft() val player = mc.thePlayer ?: return |