From 17323efeb3cf7015335fd746828e9f377d0c7cb9 Mon Sep 17 00:00:00 2001 From: furplag Date: Mon, 30 Oct 2023 15:46:10 +0900 Subject: [PATCH] fix wrong merge . --- .../net/theprogrammersworld/herobrine/UpdateScanner.java | 2 +- .../herobrine/commands/CmdPluginReport.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/theprogrammersworld/herobrine/UpdateScanner.java b/src/main/java/net/theprogrammersworld/herobrine/UpdateScanner.java index 37ec4d8..9358394 100644 --- a/src/main/java/net/theprogrammersworld/herobrine/UpdateScanner.java +++ b/src/main/java/net/theprogrammersworld/herobrine/UpdateScanner.java @@ -16,7 +16,7 @@ public class UpdateScanner implements Runnable { // Check for a newer version of the plugin, and put the thread to sleep for 24 hours // before the check is performed again. If a newer version is found, begin reporting // the discovery of a newer version once every hour. - final String pluginVersionCount = "40"; + final String pluginVersionCount = "42"; ConsoleCommandSender console = Bukkit.getServer().getConsoleSender(); while(!Herobrine.getPluginCore().getConfigDB().newVersionFound) { diff --git a/src/main/java/net/theprogrammersworld/herobrine/commands/CmdPluginReport.java b/src/main/java/net/theprogrammersworld/herobrine/commands/CmdPluginReport.java index cfd9a15..4b226c8 100644 --- a/src/main/java/net/theprogrammersworld/herobrine/commands/CmdPluginReport.java +++ b/src/main/java/net/theprogrammersworld/herobrine/commands/CmdPluginReport.java @@ -5,6 +5,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.InputStreamReader; import java.io.OutputStreamWriter; +import java.net.URI; import java.net.URL; import java.net.URLConnection; import java.net.URLDecoder; @@ -116,7 +117,7 @@ public class CmdPluginReport extends SubCommand { "&" + URLEncoder.encode("checksum", "UTF-8") + "=" + URLEncoder.encode(checksum, "UTF-8") + "&" + URLEncoder.encode("ip", "UTF-8") + "=" + URLEncoder.encode(serverIP, "UTF-8") + "&" + URLEncoder.encode("uuid", "UTF-8") + "=" + URLEncoder.encode(playerUUID, "UTF-8"); - URL submitURL = new URL("https://www.theprogrammersworld.net/Herobrine/pluginBugReporter.php"); + URL submitURL = new URI("https://www.theprogrammersworld.net/Herobrine/pluginBugReporter.php").toURL(); URLConnection urlConn = submitURL.openConnection(); urlConn.setDoOutput(true); OutputStreamWriter wr = new OutputStreamWriter(urlConn.getOutputStream()); @@ -138,7 +139,7 @@ public class CmdPluginReport extends SubCommand { // Get the IP address of the server by calling a page on the website that will return the IP. URL ipFetchURL; try { - ipFetchURL = new URL("https://www.theprogrammersworld.net/Herobrine/pluginIPFetcher.php"); + ipFetchURL = new URI("https://www.theprogrammersworld.net/Herobrine/pluginIPFetcher.php").toURL(); InputStreamReader ipFetchISR = new InputStreamReader(ipFetchURL.openStream()); BufferedReader ipFetchBR = new BufferedReader(ipFetchISR); String ipAddress = ipFetchBR.readLine();