Compare commits

...

2 Commits

Author SHA1 Message Date
PiggyPiglet
0a53559ae1 2.12.2 release 2026-02-08 20:09:01 +08:00
PiggyPiglet
6c5f19b61d Fix #1167 2026-02-08 20:02:02 +08:00
2 changed files with 3 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ plugins {
} }
group = "me.clip" group = "me.clip"
version = "2.12.2-DEV-${System.getProperty("BUILD_NUMBER")}" version = "2.12.2"
description = "An awesome placeholder provider!" description = "An awesome placeholder provider!"

View File

@@ -26,8 +26,8 @@ import java.net.URL;
import java.util.Arrays; import java.util.Arrays;
import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.HttpsURLConnection;
import com.google.gson.Gson;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import me.clip.placeholderapi.PlaceholderAPIPlugin; import me.clip.placeholderapi.PlaceholderAPIPlugin;
import me.clip.placeholderapi.scheduler.scheduling.schedulers.TaskScheduler; import me.clip.placeholderapi.scheduler.scheduling.schedulers.TaskScheduler;
import me.clip.placeholderapi.util.Msg; import me.clip.placeholderapi.util.Msg;
@@ -66,7 +66,7 @@ public class UpdateChecker implements Listener {
try { try {
HttpsURLConnection con = (HttpsURLConnection) new URL(MODRINTH_URL).openConnection(); HttpsURLConnection con = (HttpsURLConnection) new URL(MODRINTH_URL).openConnection();
con.setRequestMethod("GET"); con.setRequestMethod("GET");
final JsonElement json = JsonParser.parseReader(new BufferedReader(new InputStreamReader(con.getInputStream()))); final JsonElement json = new Gson().fromJson(new BufferedReader(new InputStreamReader(con.getInputStream())), JsonElement.class);
modrinthVersion = json.getAsJsonArray().get(0).getAsJsonObject().get("version_number").getAsString(); modrinthVersion = json.getAsJsonArray().get(0).getAsJsonObject().get("version_number").getAsString();
} catch (Exception ex) { } catch (Exception ex) {
plugin.getLogger().info("Failed to check for updates on modrinth."); plugin.getLogger().info("Failed to check for updates on modrinth.");