[BUGFIX] Would throw ClassCastException

This line would throw ClassCastException when starting the client.
This commit is contained in:
Emmastone
2016-10-23 18:49:39 +01:00
parent d6862e49fd
commit a76f9cc6f2
+3 -3
View File
@@ -184,7 +184,7 @@ public class Core {
try {
if (br != null) {
JSONObject object = (JSONObject) WebUtil.getJsonParser().parse(br);
boolean latest = Boolean.parseBoolean((String) object.get("result"));
boolean latest = (Boolean) object.get("result");
if (!latest) {
Directories.clearCache();
}
@@ -233,7 +233,7 @@ public class Core {
}
}
public static void downloadNewVersion(){
public static void downloadNewVersion() {
UILog.log(TranslationHelper.translate("UPDATES"),
TranslationHelper.translate("DOWNLOAD_UPDATE_PARABOT_AT")
+ Configuration.DOWNLOAD_BOT + (currentVersion.isNightly() ? Configuration.NIGHTLY_APPEND : ""),
@@ -265,7 +265,7 @@ public class Core {
Core.verbose("Updates available...");
return false;
}
}else{
} else {
Core.verbose("Validation disabled");
return true;
}