summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2023-07-05 12:29:49 +0200
committerGitHub <noreply@github.com>2023-07-05 12:29:49 +0200
commitc4092f9f36ef2d6a1914ee5ef606522d35e14cdc (patch)
tree5f606fa38d17f3e2471e75060c06acb9f65a2c81 /src/main/java/at/hannibal2/skyhanni/data
parent5bedd8978dc05f60ef752a95a2062e99be41281c (diff)
downloadskyhanni-c4092f9f36ef2d6a1914ee5ef606522d35e14cdc.tar.gz
skyhanni-c4092f9f36ef2d6a1914ee5ef606522d35e14cdc.tar.bz2
skyhanni-c4092f9f36ef2d6a1914ee5ef606522d35e14cdc.zip
mirror verse jump and run (#265)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Co-authored-by: Roman / Linnea Gräf <nea@nea.moe>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt16
1 files changed, 10 insertions, 6 deletions
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) {