mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-02 14:58:43 +01:00
Fixed a crash involving invalid positions.
This commit is contained in:
parent
7baf5fa484
commit
534d546002
1 changed files with 12 additions and 0 deletions
|
@ -143,6 +143,18 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
||||||
this.lastYaw = this.e.yaw;
|
this.lastYaw = this.e.yaw;
|
||||||
this.lastPitch = this.e.pitch;
|
this.lastPitch = this.e.pitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Math.abs(packet10flying.a) > 32000000 || Math.abs(packet10flying.c) > 32000000) {
|
||||||
|
System.err.println(player.getName() + " was caught trying to crash the server with an invalid position.");
|
||||||
|
player.kickPlayer("Nope!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Math.abs(packet10flying.c) > 32000000) {
|
||||||
|
System.err.println(player.getName() + " was caught trying to crash the server with an invalid position.");
|
||||||
|
player.kickPlayer("Nope!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
if (this.l) {
|
if (this.l) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue