mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 19:52:55 +01:00
Don't kick player when they travel too far. Fixes BUKKIT-2968
If a player travels past 32,000,000 blocks on the X or Z coordinates they will be kicked for having an illegal position. On kick their player data is saved which includes their (illegal) position. This means on join they are immediately kicked again for the same reason and are stuck. Instead of kicking at all in this case just teleport the player back to their previous position just like the moved wrongly check does.
This commit is contained in:
parent
bd0868ae1e
commit
2d832bf148
1 changed files with 2 additions and 1 deletions
|
@ -336,7 +336,8 @@ public class NetServerHandler extends NetHandler {
|
|||
}
|
||||
|
||||
if (Math.abs(packet10flying.x) > 3.2E7D || Math.abs(packet10flying.z) > 3.2E7D) {
|
||||
this.disconnect("Illegal position");
|
||||
// CraftBukkit - teleport to previous position instead of kicking, players get stuck
|
||||
this.a(this.y, this.z, this.q, this.player.yaw, this.player.pitch);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue