+ 修复更新检测问题

master
坏黑 2018-10-10 16:55:28 +08:00
parent 91840d6a6b
commit 989672b948
1 changed files with 2 additions and 2 deletions

View File

@ -29,14 +29,14 @@ public class UpdateTask {
if (!Main.getInst().getConfig().getBoolean("UPDATE-CHECK")) {
return;
}
String value = FileUtils.getStringFromURL("https://api.github.com/repos/Bkm016/TabooLib/tags", null);
String value = FileUtils.getStringFromURL("https://api.github.com/repos/Bkm016/TabooLib/releases", null);
if (value == null) {
TLocale.Logger.error("UPDATETASK.VERSION-FAIL");
return;
}
JsonElement json = new JsonParser().parse(value);
if (json.isJsonArray()) {
newVersion = json.getAsJsonArray().get(0).getAsJsonObject().get("name").getAsDouble();
newVersion = json.getAsJsonArray().get(0).getAsJsonObject().get("tag_name").getAsDouble();
if (TabooLib.getPluginVersion() >= newVersion) {
TLocale.Logger.info("UPDATETASK.VERSION-LATEST");
} else {