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

+1 -1
View File
@@ -35,7 +35,7 @@ apply plugin: 'java'
apply plugin: 'forge'
apply plugin: 'maven'
version = "1.5.11-RC2_1.7.10"
version = "1.5.11-RC3_1.7.10"
group= "mcp.mobius.waila" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Waila"
@@ -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);
}