Propagate failed to bind to port error (#10235)

This commit is contained in:
Warrior 2024-02-10 20:23:50 +01:00 committed by GitHub
parent 581fb30a4c
commit 99bae594c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 7 deletions

View File

@ -39,6 +39,18 @@ index 536f0c496ce36ca3248fc6eeac9bbd77214a36f9..31718823250a1490b783f426fff65bf5
Iterator iterator = advancementtree.roots().iterator();
while (iterator.hasNext()) {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index c666bcd29d39ee7bca05edac348b7fa0325e80ab..0c2145c66369a950567ddfbf157067ca7cb4dd11 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -265,6 +265,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
DedicatedServer.LOGGER.warn("**** FAILED TO BIND TO PORT!");
DedicatedServer.LOGGER.warn("The exception was: {}", ioexception.toString());
DedicatedServer.LOGGER.warn("Perhaps a server is already running on that port?");
+ if (true) throw new IllegalStateException("Failed to bind to port", ioexception); // Paper - Propagate failed to bind to port error
return false;
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 17c059020eae2c125971b4f6ffe90db46fb85cd2..6e1f1bd674e02426f42d013e2b0995d45e37ace0 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java

View File

@ -15676,10 +15676,10 @@ index 48da5bdabcf38afbbd1509eca56d5c761622409f..48e3b0f065b370f780f8a6145fba9f3f
public boolean isDebugging() {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index c666bcd29d39ee7bca05edac348b7fa0325e80ab..9e0c5bb92fb45cab7d78c5ad631c64170d48729f 100644
index 0c2145c66369a950567ddfbf157067ca7cb4dd11..bcb1505c020c1a6c2bcb9508cf198f4b11ca984e 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -451,7 +451,34 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -452,7 +452,34 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
return this.getProperties().allowNether;
}
@ -18850,7 +18850,7 @@ index b5d6a7eaa24d9968e159d77a4295be00332a5457..dff2dfbe9cc04894d42181c6691e27ad
return crashreportsystemdetails;
}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index ecf463139bb6567103d81ae26cfff53d843cbd26..36aa6fa15e12da2caec671895d5e627da0e9ff95 100644
index ae5a2136a0e266d4c35190f5d33552994c842786..5657f1ecbadda96a79978f918393c0c9a58dca83 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -276,6 +276,50 @@ public class ServerPlayer extends Player {

View File

@ -234,10 +234,10 @@ index 1dfafbe508b4e4598339f412e5fb9d92717b5d26..97826afb097851f5736a64ae154d4214
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 9e0c5bb92fb45cab7d78c5ad631c64170d48729f..6de6dad36203479677a29ad61e21bc369d4e5513 100644
index bcb1505c020c1a6c2bcb9508cf198f4b11ca984e..2ecf79086e9e8069f43120e9146e98962a75eca8 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -309,7 +309,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -310,7 +310,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
long j = Util.getNanos() - i;
String s = String.format(Locale.ROOT, "%.3fs", (double) j / 1.0E9D);
@ -246,7 +246,7 @@ index 9e0c5bb92fb45cab7d78c5ad631c64170d48729f..6de6dad36203479677a29ad61e21bc36
if (dedicatedserverproperties.announcePlayerAchievements != null) {
((GameRules.BooleanValue) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, null); // Paper - Pass ServerLevel for gamerule callbacks
}
@@ -437,7 +437,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -438,7 +438,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
// this.remoteStatusListener.stop(); // Paper - don't wait for remote connections
}
@ -256,7 +256,7 @@ index 9e0c5bb92fb45cab7d78c5ad631c64170d48729f..6de6dad36203479677a29ad61e21bc36
}
@Override
@@ -818,7 +819,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -819,7 +820,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@Override
public void stopServer() {
super.stopServer();