Paper/patches/unapplied/server/0163-Prevent-logins-from-being-processed-when-the-player-.patch

22 lines
1.3 KiB
Diff
Raw Normal View History

2023-09-21 23:04:51 +02:00
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/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
2023-12-05 18:20:55 +01:00
index 85f1591d1f87b314d18b4eb46b6388b7c9d57be7..2ecc29755eb0e79d49f0713e56849d7971dd38ed 100644
2023-09-21 23:04:51 +02:00
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -79,7 +79,9 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
}
// Paper end
if (this.state == ServerLoginPacketListenerImpl.State.VERIFYING) {
+ if (this.connection.isConnected()) { // Paper - prevent logins to be processed even though disconnect was called
this.verifyLoginAndFinishConnectionSetup((GameProfile) Objects.requireNonNull(this.authenticatedProfile));
+ } // Paper
}
if (this.state == ServerLoginPacketListenerImpl.State.WAITING_FOR_DUPE_DISCONNECT && !this.isPlayerAlreadyInWorld((GameProfile) Objects.requireNonNull(this.authenticatedProfile))) {