use of me.xmrvizzy.skyblocker.skyblock.item.PriceInfoTooltip in project Skyblocker by LifeIsAParadox.
the class Utils method sbChecker.
public static void sbChecker() {
MinecraftClient client = MinecraftClient.getInstance();
List<String> sidebar;
if (client.world == null || client.isInSingleplayer() || (sidebar = getSidebar()) == null) {
isOnSkyblock = false;
isInDungeons = false;
return;
}
String string = sidebar.toString();
if (sidebar.isEmpty())
return;
if (sidebar.get(0).contains("SKYBLOCK") && !isOnSkyblock) {
if (!isInjected) {
isInjected = true;
ItemTooltipCallback.EVENT.register(PriceInfoTooltip::onInjectTooltip);
}
Events.onSkyblockJoin();
}
if (!sidebar.get(0).contains("SKYBLOCK") && isOnSkyblock)
Events.onSkyblockDisconnect();
isInDungeons = isOnSkyblock && string.contains("The Catacombs");
}
Aggregations