diff options
Diffstat (limited to 'src/main/java/at')
3 files changed, 18 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt index 638c2e0b8..166282582 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt @@ -329,8 +329,6 @@ class HypixelData { } } - if (!event.isMod(5)) return - if (!LorenzUtils.onHypixel) { checkHypixel() if (LorenzUtils.onHypixel) { @@ -340,6 +338,8 @@ class HypixelData { } if (!LorenzUtils.onHypixel) return + if (!event.isMod(5)) return + val inSkyBlock = checkScoreboard() if (inSkyBlock) { checkIsland() diff --git a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt index 08dd89539..c5f072587 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt @@ -39,7 +39,7 @@ object ProfileStorageData { val profileName = event.name if (playerSpecific == null) { DelayedRun.runDelayed(10.seconds) { - workaroundIn10Seconds(profileName) + workaroundIn10SecondsProfileStorage(profileName) } ErrorManager.skyHanniError("playerSpecific is null in ProfileJoinEvent!") } @@ -51,7 +51,8 @@ object ProfileStorageData { ConfigLoadEvent().postAndCatch() } - private fun workaroundIn10Seconds(profileName: String) { + private fun workaroundIn10SecondsProfileStorage(profileName: String) { + println("workaroundIn10SecondsProfileStorage") val playerSpecific = playerSpecific val sackPlayers = sackPlayers diff --git a/src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt b/src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt index ea930bee4..22032ff84 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt @@ -20,6 +20,7 @@ import net.minecraft.world.WorldSettings import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.relauncher.Side import net.minecraftforge.fml.relauncher.SideOnly +import kotlin.time.Duration.Companion.seconds object TabListData { private var tablistCache = emptyList<String>() @@ -126,6 +127,9 @@ object TabListData { if (tablistCache != tabList) { tablistCache = tabList TabListUpdateEvent(getTabList()).postAndCatch() + if (!LorenzUtils.onHypixel) { + workaroundDelayedTabListUpdateAgain() + } } val tabListOverlay = Minecraft.getMinecraft().ingameGUI.tabList as AccessorGuiPlayerTabOverlay @@ -137,4 +141,13 @@ object TabListData { } footer = tabFooter } + + private fun workaroundDelayedTabListUpdateAgain() { + DelayedRun.runDelayed(2.seconds) { + if (LorenzUtils.onHypixel) { + println("workaroundDelayedTabListUpdateAgain") + TabListUpdateEvent(getTabList()).postAndCatch() + } + } + } } |