diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt | 16 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt index 0e6efff26..929515283 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt @@ -17,7 +17,7 @@ class HypixelData { companion object { var hypixel = false var skyblock = false - var mode: String = "" + var skyBlockArea: String = "" } var loggerLocationChange = LorenzLogger("debug/location_change") @@ -79,24 +79,24 @@ class HypixelData { } private fun checkMode() { - var location = "" + var newArea = "" var guesting = false for (line in TabListUtils.getTabList()) { if (line.startsWith("§r§b§lArea: ")) { - location = line.split(": ")[1].removeColor() + newArea = line.split(": ")[1].removeColor() } if (line == "§r Status: §r§9Guest§r") { guesting = true } } if (guesting) { - location = "$location guesting" + newArea = "$newArea guesting" } - if (mode != location) { - LocationChangeEvent(location, mode).postAndCatch() - loggerLocationChange.log(location) - mode = location + if (skyBlockArea != newArea) { + LocationChangeEvent(newArea, skyBlockArea).postAndCatch() + loggerLocationChange.log(newArea) + skyBlockArea = newArea } } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt index b6854a3da..fa3e69cdf 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt @@ -24,7 +24,7 @@ object LorenzUtils { get() = inSkyblock && DungeonData.inDungeon() val skyBlockIsland: String - get() = HypixelData.mode + get() = HypixelData.skyBlockArea val inKuudraFight: Boolean get() = skyBlockIsland == "Instanced" |