Skip to content

Commit

Permalink
fixed broken Maintained mod
Browse files Browse the repository at this point in the history
  • Loading branch information
Quarri6343 committed May 8, 2024
1 parent 152d446 commit 4b1223a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/mcp/mobius/waila/client/KeyEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,20 @@ public KeyEvent() {

@SubscribeEvent
public void onKeyEvent(KeyInputEvent event) {
boolean showKey = key_show.isPressed();
if (key_cfg.isPressed()) {
Minecraft mc = Minecraft.getMinecraft();
if (mc.currentScreen == null) {
mc.displayGuiScreen(new ScreenConfig(null));
}
} else if (key_show.isPressed() && ConfigHandler.instance()
} else if (showKey && ConfigHandler.instance()
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_MODE, false)) {
boolean status = ConfigHandler.instance()
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, true);
ConfigHandler.instance()
.setConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, !status);
} else
if (key_show.isPressed() && !ConfigHandler.instance()
if (showKey && !ConfigHandler.instance()
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_MODE, false)) {
ConfigHandler.instance()
.setConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, true);
Expand Down

0 comments on commit 4b1223a

Please sign in to comment.