fix wrong merge .

This commit is contained in:
furplag 2023-10-30 15:46:10 +09:00
parent 59e562942d
commit 17323efeb3
2 changed files with 4 additions and 3 deletions

View File

@ -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 // 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 // before the check is performed again. If a newer version is found, begin reporting
// the discovery of a newer version once every hour. // the discovery of a newer version once every hour.
final String pluginVersionCount = "40"; final String pluginVersionCount = "42";
ConsoleCommandSender console = Bukkit.getServer().getConsoleSender(); ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
while(!Herobrine.getPluginCore().getConfigDB().newVersionFound) { while(!Herobrine.getPluginCore().getConfigDB().newVersionFound) {

View File

@ -5,6 +5,7 @@ import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import java.net.URI;
import java.net.URL; import java.net.URL;
import java.net.URLConnection; import java.net.URLConnection;
import java.net.URLDecoder; 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("checksum", "UTF-8") + "=" + URLEncoder.encode(checksum, "UTF-8") +
"&" + URLEncoder.encode("ip", "UTF-8") + "=" + URLEncoder.encode(serverIP, "UTF-8") + "&" + URLEncoder.encode("ip", "UTF-8") + "=" + URLEncoder.encode(serverIP, "UTF-8") +
"&" + URLEncoder.encode("uuid", "UTF-8") + "=" + URLEncoder.encode(playerUUID, "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(); URLConnection urlConn = submitURL.openConnection();
urlConn.setDoOutput(true); urlConn.setDoOutput(true);
OutputStreamWriter wr = new OutputStreamWriter(urlConn.getOutputStream()); 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. // Get the IP address of the server by calling a page on the website that will return the IP.
URL ipFetchURL; URL ipFetchURL;
try { 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()); InputStreamReader ipFetchISR = new InputStreamReader(ipFetchURL.openStream());
BufferedReader ipFetchBR = new BufferedReader(ipFetchISR); BufferedReader ipFetchBR = new BufferedReader(ipFetchISR);
String ipAddress = ipFetchBR.readLine(); String ipAddress = ipFetchBR.readLine();