Check processed disconnect after invoking keepConnectionAlive()

Since we move this up, we need to check it to prevent ticking
a possibly removed player
This commit is contained in:
Spottedleaf 2024-01-09 14:37:27 -08:00
parent e89a107ef0
commit 16e8d3aea4

View File

@ -15145,7 +15145,7 @@ index 79326308f6126f84a3cbb3d5a33302de048d8a50..81090d1b5d67506268a41c6387a1d453
Collections.shuffle( this.connections ); Collections.shuffle( this.connections );
} }
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 64255f7db85886421d5029766e8a6d1eadb94cff..de25bf4893ac741fe687ab9bb0aa975db8686400 100644 index 64255f7db85886421d5029766e8a6d1eadb94cff..d5d2dae8589749f79520d05feb0627d3c425628b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -292,7 +292,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -292,7 +292,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -15186,7 +15186,7 @@ index 64255f7db85886421d5029766e8a6d1eadb94cff..de25bf4893ac741fe687ab9bb0aa975d
public void tick() { public void tick() {
+ // Folia start - region threading + // Folia start - region threading
+ this.keepConnectionAlive(); + this.keepConnectionAlive();
+ if (this.player.wonGame) { + if (this.processedDisconnect || this.player.wonGame) {
+ return; + return;
+ } + }
+ // Folia end - region threading + // Folia end - region threading