Some more attempting to get multiplayer to work

This commit is contained in:
zontreck 2023-12-05 22:42:09 -07:00
parent 466fb11855
commit 76bbc59388
2 changed files with 5 additions and 5 deletions

View file

@ -21,7 +21,7 @@ final class HeartbeatThread extends Thread {
HttpURLConnection var1 = null;
try {
URL var2 = new URL("https://api.zontreck.dev/zni/yggdrasil/legacy/heartbeat.php");
URL var2 = new URL("https://api.zontreck.dev/zni/yggdrasil/legacy/heartbeat_2.php");
var1 = (HttpURLConnection)var2.openConnection();
var1.setRequestMethod("POST");
var1.setDoOutput(true);
@ -38,13 +38,13 @@ final class HeartbeatThread extends Thread {
var9.close();
BufferedReader var10 = new BufferedReader(new InputStreamReader(var1.getInputStream()));
String var3 = var10.readLine();
if(!MinecraftServer.a(this.minecraft).equals(var3)) {
if(!MinecraftServer.getServerURL(this.minecraft).equals(var3)) {
MinecraftServer.logger.info("To connect directly to this server, surf to: " + var3);
PrintWriter var4 = new PrintWriter(new FileWriter("externalurl.txt"));
var4.println(var3);
var4.close();
MinecraftServer.logger.info("(This is also in externalurl.txt)");
MinecraftServer.a(this.minecraft, var3);
MinecraftServer.setServerURL(this.minecraft, var3);
}
var10.close();

View file

@ -601,11 +601,11 @@ public class MinecraftServer implements Runnable {
}
}
static String a(MinecraftServer var0) {
static String getServerURL(MinecraftServer var0) {
return var0.serverURL;
}
static String a(MinecraftServer var0, String var1) {
static String setServerURL(MinecraftServer var0, String var1) {
return var0.serverURL = var1;
}