Paper/Spigot-Server-Patches/0177-Prevent-logins-from-being-processed-when-the-player-.patch
jmp 1718f61bf8 Updated Upstream (CraftBukkit/Spigot)
Doesn't compile yet.

CraftBukkit Changes:
90d6905b Repackage NMS
69cf961d Repackage patches

Spigot Changes:
79d53c28 Repackage NMS
2021-03-18 18:03:22 +01:00

25 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: killme <killme-git@ibts.me>
Date: Sun, 12 Nov 2017 19:40:01 +0100
Subject: [PATCH] Prevent logins from being processed when the player has
disconnected
diff --git a/src/main/java/net/minecraft/server/network/LoginListener.java b/src/main/java/net/minecraft/server/network/LoginListener.java
index 5b96c69014dbfb8eb3e2ecf370ad69f2ffc31453..714f44a668eb35b3c61bb9ab140f884917efd6f5 100644
--- a/src/main/java/net/minecraft/server/network/LoginListener.java
+++ b/src/main/java/net/minecraft/server/network/LoginListener.java
@@ -75,7 +75,11 @@ public class LoginListener implements PacketLoginInListener {
}
// Paper end
if (this.g == LoginListener.EnumProtocolState.READY_TO_ACCEPT) {
- this.c();
+ // Paper start - prevent logins to be processed even though disconnect was called
+ if (networkManager.isConnected()) {
+ this.c();
+ }
+ // Paper end
} else if (this.g == LoginListener.EnumProtocolState.DELAY_ACCEPT) {
EntityPlayer entityplayer = this.server.getPlayerList().getPlayer(this.i.getId());