From f44524249ffb7f8e9f22bcade6373ae60986e883 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Sun, 17 Apr 2016 13:32:19 -0500 Subject: [PATCH] Don't check velocities on Projectiles Closes GH-217 --- Spigot-Server-Patches/Add-velocity-warnings.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/Add-velocity-warnings.patch b/Spigot-Server-Patches/Add-velocity-warnings.patch index 57983cea80..31df4c4ee5 100644 --- a/Spigot-Server-Patches/Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/Add-velocity-warnings.patch @@ -13,8 +13,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void setVelocity(Vector vel) { + // Paper start - Warn server owners when plugins try to set super high velocities -+ if (vel.getX() > 4 || vel.getX() < -4 || vel.getY() > 4 || vel.getY() < -4 || vel.getZ() > 4 || vel.getZ() < -4) { -+ getServer().getLogger().warning("Excessive velocity set detected: tried to set velocity of entity #"+getEntityId()+" to ("+vel.getX()+","+vel.getY()+","+vel.getZ()+")."); ++ if (!(this instanceof org.bukkit.entity.Projectile) && (vel.getX() > 4 || vel.getX() < -4 || vel.getY() > 4 || vel.getY() < -4 || vel.getZ() > 4 || vel.getZ() < -4)) { ++ getServer().getLogger().warning("Excessive velocity set detected: tried to set velocity of entity #" + getEntityId() + " to (" + vel.getX() + "," + vel.getY() + "," + vel.getZ() + ")."); + Thread.dumpStack(); + } + // Paper end