Don't skip full player connection tick when dead

Still need to send keep alives and kick for idle

Fixes #3299
This commit is contained in:
Aikar 2020-05-06 19:30:47 -04:00
parent f410ec4423
commit 7ec3cf8948

View file

@ -82,13 +82,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ playerJoinReady.run();
+ }
+ // Don't tick if not valid (dead), otherwise we load chunks below
+ if (!this.player.valid) {
+ return;
+ }
+ if (this.player.valid) {
+ // Paper end
this.syncPosition();
this.player.lastX = this.player.locX();
this.player.lastY = this.player.locY();
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn {
this.r = null;
this.D = false;
this.E = 0;
- }
+ }} // Paper - end if (valid)
this.minecraftServer.getMethodProfiler().enter("keepAlive");
// Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java