Skip to content

Commit

Permalink
Add SkyBlock toggle for HUDs
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed Dec 19, 2023
1 parent 18fdcef commit ccf06e1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/cc/polyfrost/oneconfig/hud/Hud.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import cc.polyfrost.oneconfig.gui.OneConfigGui;
import cc.polyfrost.oneconfig.libs.universal.UMatrixStack;
import cc.polyfrost.oneconfig.platform.Platform;
import cc.polyfrost.oneconfig.utils.hypixel.LocrawInfo;
import cc.polyfrost.oneconfig.utils.hypixel.LocrawUtil;

/**
* Represents a HUD element in OneConfig.
Expand Down Expand Up @@ -150,6 +152,10 @@ protected boolean shouldShow() {
if (!showInGuis && Platform.getGuiPlatform().getCurrentScreen() != null && !(Platform.getGuiPlatform().getCurrentScreen() instanceof OneConfigGui))
return false;
if (!showInChat && Platform.getGuiPlatform().isInChat()) return false;
if (!showInSkyBlock) {
LocrawInfo locrawInfo = LocrawUtil.INSTANCE.getLocrawInfo();
if (locrawInfo != null && locrawInfo.getGameType() == LocrawInfo.GameType.SKYBLOCK) return false;
}
return showInDebug || !Platform.getGuiPlatform().isInDebug();
}

Expand Down Expand Up @@ -208,4 +214,9 @@ public void setScale(float scale, boolean example) {
name = "Show in GUIs"
)
public boolean showInGuis = true;

@Switch(
name = "Show in SkyBlock"
)
public boolean showInSkyBlock = true;
}

0 comments on commit ccf06e1

Please sign in to comment.