mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-05 00:37:46 +00:00
Merge pull request #142 from Parabot/bugfix/boolean-string
[BUGFIX] Would throw ClassCastException
This commit is contained in:
@@ -184,7 +184,7 @@ public class Core {
|
|||||||
try {
|
try {
|
||||||
if (br != null) {
|
if (br != null) {
|
||||||
JSONObject object = (JSONObject) WebUtil.getJsonParser().parse(br);
|
JSONObject object = (JSONObject) WebUtil.getJsonParser().parse(br);
|
||||||
boolean latest = Boolean.parseBoolean((String) object.get("result"));
|
boolean latest = (Boolean) object.get("result");
|
||||||
if (!latest) {
|
if (!latest) {
|
||||||
Directories.clearCache();
|
Directories.clearCache();
|
||||||
}
|
}
|
||||||
@@ -233,7 +233,7 @@ public class Core {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void downloadNewVersion(){
|
public static void downloadNewVersion() {
|
||||||
UILog.log(TranslationHelper.translate("UPDATES"),
|
UILog.log(TranslationHelper.translate("UPDATES"),
|
||||||
TranslationHelper.translate("DOWNLOAD_UPDATE_PARABOT_AT")
|
TranslationHelper.translate("DOWNLOAD_UPDATE_PARABOT_AT")
|
||||||
+ Configuration.DOWNLOAD_BOT + (currentVersion.isNightly() ? Configuration.NIGHTLY_APPEND : ""),
|
+ Configuration.DOWNLOAD_BOT + (currentVersion.isNightly() ? Configuration.NIGHTLY_APPEND : ""),
|
||||||
@@ -265,7 +265,7 @@ public class Core {
|
|||||||
Core.verbose("Updates available...");
|
Core.verbose("Updates available...");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
Core.verbose("Validation disabled");
|
Core.verbose("Validation disabled");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user