mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
Merge pull request #935 from avatarmc/prevent-disconnected-logins
Prevent logins from being processed when the player has disconnected
This commit is contained in:
commit
0c011b87c5
1 changed files with 25 additions and 0 deletions
|
@ -0,0 +1,25 @@
|
|||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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 {
|
||||
}
|
||||
// Paper end
|
||||
if (this.g == LoginListener.EnumProtocolState.READY_TO_ACCEPT) {
|
||||
- this.b();
|
||||
+ // Paper start - prevent logins to be processed even though disconnect was called
|
||||
+ if (networkManager.isConnected()) {
|
||||
+ this.b();
|
||||
+ }
|
||||
+ // Paper end
|
||||
} else if (this.g == LoginListener.EnumProtocolState.DELAY_ACCEPT) {
|
||||
EntityPlayer entityplayer = this.server.getPlayerList().a(this.i.getId());
|
||||
|
||||
--
|
Loading…
Reference in a new issue