mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
Fixed name display in log messages for invalid yaw/pitch check.
This commit is contained in:
parent
8aa376fc27
commit
5e154b2235
@ -148,7 +148,7 @@ public abstract class Entity {
|
|||||||
// Craftbukkit start
|
// Craftbukkit start
|
||||||
if ((f == Float.POSITIVE_INFINITY) || (f == Float.NEGATIVE_INFINITY) || (Float.isNaN(f))) {
|
if ((f == Float.POSITIVE_INFINITY) || (f == Float.NEGATIVE_INFINITY) || (Float.isNaN(f))) {
|
||||||
if (this instanceof EntityPlayer) {
|
if (this instanceof EntityPlayer) {
|
||||||
System.err.println(getBukkitEntity() + " was caught trying to crash the server with an invalid yaw");
|
System.err.println(((CraftPlayer)this.getBukkitEntity()).getName() + " was caught trying to crash the server with an invalid yaw");
|
||||||
((CraftPlayer)this.getBukkitEntity()).kickPlayer("Nope");
|
((CraftPlayer)this.getBukkitEntity()).kickPlayer("Nope");
|
||||||
}
|
}
|
||||||
f = 0;
|
f = 0;
|
||||||
@ -156,7 +156,7 @@ public abstract class Entity {
|
|||||||
|
|
||||||
if ((f1 == Float.POSITIVE_INFINITY) || (f1 == Float.NEGATIVE_INFINITY) || (Float.isNaN(f1))) {
|
if ((f1 == Float.POSITIVE_INFINITY) || (f1 == Float.NEGATIVE_INFINITY) || (Float.isNaN(f1))) {
|
||||||
if (this instanceof EntityPlayer) {
|
if (this instanceof EntityPlayer) {
|
||||||
System.err.println(getBukkitEntity() + " was caught trying to crash the server with an invalid pitch");
|
System.err.println(((CraftPlayer)this.getBukkitEntity()).getName() + " was caught trying to crash the server with an invalid pitch");
|
||||||
((CraftPlayer)this.getBukkitEntity()).kickPlayer("Nope");
|
((CraftPlayer)this.getBukkitEntity()).kickPlayer("Nope");
|
||||||
}
|
}
|
||||||
f1 = 0;
|
f1 = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user