mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
There is no reason to continue if we DC a player during shutdown
Thanks Ice
This commit is contained in:
parent
8d26bacb73
commit
60d5c10c1c
1 changed files with 2 additions and 1 deletions
|
@ -5,7 +5,7 @@ Subject: [PATCH] Block player logins during server shutdown
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
|
||||
index 2158fcd3..2367023c 100644
|
||||
index 2158fcd32..c5434e6ba 100644
|
||||
--- a/src/main/java/net/minecraft/server/LoginListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/LoginListener.java
|
||||
@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable {
|
||||
|
@ -15,6 +15,7 @@ index 2158fcd3..2367023c 100644
|
|||
+ // Paper start - Do not allow logins while the server is shutting down
|
||||
+ if (!MinecraftServer.getServer().isRunning()) {
|
||||
+ this.disconnect(new ChatMessage(org.spigotmc.SpigotConfig.restartMessage));
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
if (this.g == LoginListener.EnumProtocolState.READY_TO_ACCEPT) {
|
||||
|
|
Loading…
Reference in a new issue