From 752e94358bea9b95faed5fb77e0bf5f55f90f609 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Fri, 24 May 2024 02:40:56 +0200 Subject: Fix: Profile not loaded correctly (#1872) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../java/at/hannibal2/skyhanni/data/HypixelData.kt | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt index 55ab2dd35..024733446 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt @@ -283,6 +283,7 @@ class HypixelData { } @SubscribeEvent + // TODO rewrite everything in here fun onTick(event: LorenzTickEvent) { if (!LorenzUtils.inSkyBlock) { // Modified from NEU. @@ -302,17 +303,19 @@ class HypixelData { } } - if (LorenzUtils.inSkyBlock) { - loop@ for (line in ScoreboardData.sidebarLinesFormatted) { - skyblockAreaPattern.matchMatcher(line) { - val originalLocation = group("area") - skyBlockArea = LocationFixData.fixLocation(skyBlockIsland) ?: originalLocation - skyBlockAreaWithSymbol = line.trim() - break@loop + if (LorenzUtils.onHypixel) { + if (LorenzUtils.inSkyBlock) { + loop@ for (line in ScoreboardData.sidebarLinesFormatted) { + skyblockAreaPattern.matchMatcher(line) { + val originalLocation = group("area") + skyBlockArea = LocationFixData.fixLocation(skyBlockIsland) ?: originalLocation + skyBlockAreaWithSymbol = line.trim() + break@loop + } } - } - checkProfileName() + checkProfileName() + } } if (!event.isMod(5)) return -- cgit