Fixed case where config is written too many times in "press to show" mode.

This commit is contained in:
Thomas Guimbretiere committed 2015-05-21 19:13:38 +02:00
1 parent cbeb3b3628
commit ce6474fc29
2 files changed
+5 -3

No files matched your search

@@ -59,8 +59,10 @@ public class WailaTickHandler{
@SideOnly(Side.CLIENT)
public void tickClient(TickEvent.ClientTickEvent event) {
if (!Keyboard.isKeyDown(KeyEvent.key_show.getKeyCode()) && !ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_MODE, false)){
ConfigHandler.instance().setConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, false);
if (!Keyboard.isKeyDown(KeyEvent.key_show.getKeyCode()) &&
!ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_MODE, false) &&
ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, false)){
ConfigHandler.instance().setConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, false);
}