mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 20:30:28 +01:00
4e958e229f
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: zml <zml@stellardrift.ca> Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
25 lines
1.1 KiB
Diff
25 lines
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
|
|
index a8f155b7149d5702896375c7cae1c8c573543060..144df45865105a65ed87053935878b3f12146f4a 100644
|
|
--- a/src/main/java/net/minecraft/server/LoginListener.java
|
|
+++ b/src/main/java/net/minecraft/server/LoginListener.java
|
|
@@ -57,7 +57,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());
|
|
|