From aa22ec0e5fd495c942689cd5862e88fea66b74a2 Mon Sep 17 00:00:00 2001 From: Alkalus Date: Sat, 9 Sep 2017 22:04:09 +1000 Subject: + Added update checker config option. $ Fixed pollution related content loading when GT .08 is loaded. --- .../core/handler/events/LoginEventHandler.java | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src/Java/gtPlusPlus/core/handler') diff --git a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java index 464b825177..eac8757b0e 100644 --- a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java +++ b/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java @@ -39,16 +39,18 @@ public class LoginEventHandler { if (!this.localPlayerRef.worldObj.isRemote){ PlayerCache.appendParamChanges(this.localPlayersName, this.localPlayersUUID.toString()); - if (!Utils.isModUpToDate()){ - Utils.LOG_INFO("[GT++] You're not using the latest recommended version of GT++, consider updating."); - if (!CORE.MASTER_VERSION.toLowerCase().equals("offline")) { - Utils.LOG_INFO("Latest version is: "+CORE.MASTER_VERSION); + if (CORE.configSwitches.enableUpdateChecker){ + if (!Utils.isModUpToDate()){ + Utils.LOG_INFO("[GT++] You're not using the latest recommended version of GT++, consider updating."); + if (!CORE.MASTER_VERSION.toLowerCase().equals("offline")) { + Utils.LOG_INFO("Latest version is: "+CORE.MASTER_VERSION); + } + Utils.LOG_INFO("You currently have: "+CORE.VERSION); + ShortTimer(this.localPlayerRef, 20); + } + else { + Utils.LOG_INFO("You're using the latest recommended version of GT++."); } - Utils.LOG_INFO("You currently have: "+CORE.VERSION); - ShortTimer(this.localPlayerRef, 20); - } - else { - Utils.LOG_INFO("You're using the latest recommended version of GT++."); } } @@ -100,7 +102,7 @@ public class LoginEventHandler { } } - + //Handles notifying the player about a version update. public Timer ShortTimer(EntityPlayer localPlayer, final int seconds) { Timer timer; @@ -108,7 +110,7 @@ public class LoginEventHandler { timer.schedule(new NotifyPlayer(localPlayer), seconds * 1000); return timer; } - + //Timer Task for notifying the player. class NotifyPlayer extends TimerTask { final EntityPlayer toMessage; -- cgit