From 989672b9489f4dff170a9eab361c81f201996654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9D=8F=E9=BB=91?= Date: Wed, 10 Oct 2018 16:55:28 +0800 Subject: [PATCH] =?UTF-8?q?+=20=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/me/skymc/taboolib/update/UpdateTask.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/skymc/taboolib/update/UpdateTask.java b/src/main/java/me/skymc/taboolib/update/UpdateTask.java index 14e5bb4..e1cc92a 100644 --- a/src/main/java/me/skymc/taboolib/update/UpdateTask.java +++ b/src/main/java/me/skymc/taboolib/update/UpdateTask.java @@ -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 {