Paper/Spigot-Server-Patches/0178-Prevent-logins-from-being-processed-when-the-player-.patch

25 Zeilen
1.1 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/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
2020-06-25 15:11:48 +02:00
index 723c73a8056d34136c64cd038f274d3d94749314..3cc12e7b75b8ed21a0ea44f8453553cf856fb786 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
2020-06-25 15:11:48 +02:00
@@ -55,7 +55,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) {
2020-06-25 15:11:48 +02:00
EntityPlayer entityplayer = this.server.getPlayerList().getPlayer(this.i.getId());