aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-09-11 00:59:40 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-09-11 00:59:40 +1000
commit65e7be449116dc3364e9df4d5ec3cba83c5d1884 (patch)
tree1b61f7e4f24f4cbdef726fe9d5373aa21197139d /src/Java/gtPlusPlus
parent7ceb735ceda71bdef542773c4b3e95b0eeba6d35 (diff)
downloadGT5-Unofficial-65e7be449116dc3364e9df4d5ec3cba83c5d1884.tar.gz
GT5-Unofficial-65e7be449116dc3364e9df4d5ec3cba83c5d1884.tar.bz2
GT5-Unofficial-65e7be449116dc3364e9df4d5ec3cba83c5d1884.zip
$ Fixed a mistake in the version checking.
> comparing Strings with == not .equals()
Diffstat (limited to 'src/Java/gtPlusPlus')
-rw-r--r--src/Java/gtPlusPlus/GTplusplus.java1
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java9
-rw-r--r--src/Java/gtPlusPlus/core/lib/CORE.java2
-rw-r--r--src/Java/gtPlusPlus/core/util/Utils.java4
4 files changed, 12 insertions, 4 deletions
diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java
index b8c597f5a2..90b8bb4256 100644
--- a/src/Java/gtPlusPlus/GTplusplus.java
+++ b/src/Java/gtPlusPlus/GTplusplus.java
@@ -120,6 +120,7 @@ implements ActionListener
public void preInit(FMLPreInitializationEvent event)
{
Utils.LOG_INFO("Loading "+CORE.name+" V"+CORE.VERSION);
+ Utils.LOG_INFO("Latest is V"+CORE.MASTER_VERSION+". Updated? "+Utils.isModUpToDate());
FirstCall();
FMLCommonHandler.instance().bus().register(new LoginEventHandler());
Utils.LOG_INFO("Login Handler Initialized");
diff --git a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java
index b35a42017d..1db26846c7 100644
--- a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java
@@ -34,8 +34,13 @@ public class LoginEventHandler {
PlayerCache.appendParamChanges(localPlayersName, localPlayersUUID.toString());
if (!CORE.isModUpToDate){
- Utils.LOG_INFO("You're not using the latest version of GT++, consider updating.");
- Utils.messagePlayer(localPlayerRef, "You're not using the latest version of GT++, consider updating.");
+ Utils.LOG_INFO("You're not using the latest recommended version of GT++, consider updating.");
+ Utils.LOG_INFO("Latest version is: "+CORE.MASTER_VERSION);
+ Utils.LOG_INFO("You currently have: "+CORE.VERSION);
+ Utils.messagePlayer(localPlayerRef, "You're not using the latest recommended version of GT++, consider updating.");
+ }
+ else {
+ Utils.LOG_INFO("You're using the latest recommended version of GT++.");
}
}
diff --git a/src/Java/gtPlusPlus/core/lib/CORE.java b/src/Java/gtPlusPlus/core/lib/CORE.java
index cdcdaa30e2..f88bcfa45c 100644
--- a/src/Java/gtPlusPlus/core/lib/CORE.java
+++ b/src/Java/gtPlusPlus/core/lib/CORE.java
@@ -2,6 +2,7 @@ package gtPlusPlus.core.lib;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.gregtech.recipehandlers.GregtechRecipe;
+import gtPlusPlus.core.util.networking.NetworkUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
import gtPlusPlus.xmod.gregtech.api.interfaces.internal.IGregtech_RecipeAdder;
import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy;
@@ -21,6 +22,7 @@ public class CORE {
public static final String name = "GT++";
public static final String MODID = "miscutils";
public static final String VERSION = "1.4.6.5-release";
+ public static final String MASTER_VERSION = NetworkUtils.getContentFromURL("https://raw.githubusercontent.com/draknyte1/GTplusplus/master/Recommended.txt").toLowerCase();
public static boolean isModUpToDate = Utils.isModUpToDate();
public static boolean DEBUG = false;
public static final boolean LOAD_ALL_CONTENT = false;
diff --git a/src/Java/gtPlusPlus/core/util/Utils.java b/src/Java/gtPlusPlus/core/util/Utils.java
index 80d7fd06d5..72c4632df2 100644
--- a/src/Java/gtPlusPlus/core/util/Utils.java
+++ b/src/Java/gtPlusPlus/core/util/Utils.java
@@ -8,7 +8,6 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.core.util.item.UtilsItems;
import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.networking.NetworkUtils;
import ic2.core.IC2Potion;
import ic2.core.Ic2Items;
import ic2.core.init.InternalName;
@@ -60,7 +59,8 @@ public class Utils {
}
public static boolean isModUpToDate(){
- if (NetworkUtils.getContentFromURL("https://raw.githubusercontent.com/draknyte1/GTplusplus/master/Recommended.txt") == CORE.VERSION){
+
+ if (CORE.MASTER_VERSION.equals(CORE.VERSION.toLowerCase())){
return true;
}
return false;