From c4092f9f36ef2d6a1914ee5ef606522d35e14cdc Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Wed, 5 Jul 2023 12:29:49 +0200 Subject: mirror verse jump and run (#265) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Co-authored-by: Roman / Linnea Gräf --- src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/data') diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt index 4d0cce395..7c017f8c5 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt @@ -28,12 +28,7 @@ class HypixelData { var profileName = "" var joinedWorld = 0L - fun readSkyBlockArea(): String { - return ScoreboardData.sidebarLinesFormatted - .firstOrNull { it.startsWith(" §7⏣ ") || it.startsWith(" §5ф ") } - ?.substring(5)?.removeColor() - ?: "invalid" - } + var skyBlockArea = "?" } private var loggerIslandChange = LorenzLogger("debug/island_change") @@ -71,6 +66,15 @@ class HypixelData { @SubscribeEvent fun onTick(event: LorenzTickEvent) { + if (event.isMod(2)) { + if (LorenzUtils.inSkyBlock) { + skyBlockArea = ScoreboardData.sidebarLinesFormatted + .firstOrNull { it.startsWith(" §7⏣ ") || it.startsWith(" §5ф ") } + ?.substring(5)?.removeColor() + ?: "?" + } + } + if (!event.isMod(5)) return if (!LorenzUtils.onHypixel) { -- cgit