From 7ab8389f0f2c61056fccbe827a105413300c0789 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Tue, 4 Jan 2022 00:36:47 -0700 Subject: fixed all System.out calls, added command --- src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java') diff --git a/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java b/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java index d926057..59c7b30 100644 --- a/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java +++ b/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java @@ -4,15 +4,21 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; +import org.bukkit.plugin.java.JavaPlugin; + +import net.brysonsteck.Resurrection.Resurrection; + import java.io.*; import java.net.URL; import java.net.URLConnection; +import java.util.logging.Logger; public class CheckForUpdate { boolean success; String version; String versionURL; + Logger log = JavaPlugin.getProvidingPlugin(Resurrection.class).getLogger(); public CheckForUpdate() { try { @@ -26,7 +32,7 @@ public class CheckForUpdate { versionURL = softwareObj.get("github-release").toString(); success = true; } catch (IOException e) { - System.out.println("[Resurrection] An error has occurred while attempting to check for updates."); + log.warning("An error has occurred while attempting to check for updates."); e.printStackTrace(); } } -- cgit v1.2.3