From db62c8a4ab49d595eef975d888c0350483ffa901 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Tue, 12 Mar 2024 21:05:24 +0100 Subject: fixed hypixel update: tab widget allow to disable profile name (#1153) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../at/hannibal2/skyhanni/data/ProfileStorageData.kt | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt index 274cf24e0..29a32d066 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt @@ -12,6 +12,7 @@ import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher +import at.hannibal2.skyhanni.utils.TabListData import at.hannibal2.skyhanni.utils.UtilsPatterns import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -66,10 +67,18 @@ object ProfileStorageData { if (noTabListTime.passedSince() > 3.seconds) { noTabListTime = SimpleTimeMark.now() - ChatUtils.chat( - "Extra Information from Tab list not found! " + - "Enable it: SkyBlock Menu ➜ Settings ➜ Personal ➜ User Interface ➜ Player List Info" - ) + val foundSkyBlockTabList = TabListData.getTabList().any { it.contains("§b§lArea:") } + if (foundSkyBlockTabList) { + ChatUtils.clickableChat( + "§cCan not read profile name from tab list! Open /widget and enable Profile Widget", + command = "widget" + ) + } else { + ChatUtils.chat( + "§cExtra Information from Tab list not found! " + + "Enable it: SkyBlock Menu ➜ Settings ➜ Personal ➜ User Interface ➜ Player List Info" + ) + } } } -- cgit