mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-27 02:02:03 -07:00
ignore excessive vel for Minecarts (Fixes #7515)
This commit is contained in:
@@ -25,7 +25,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
Preconditions.checkArgument(velocity != null, "velocity");
|
Preconditions.checkArgument(velocity != null, "velocity");
|
||||||
velocity.checkFinite();
|
velocity.checkFinite();
|
||||||
+ // Paper start - Warn server owners when plugins try to set super high velocities
|
+ // Paper start - Warn server owners when plugins try to set super high velocities
|
||||||
+ if (!(this instanceof org.bukkit.entity.Projectile) && isUnsafeVelocity(velocity)) {
|
+ if (!(this instanceof org.bukkit.entity.Projectile || this instanceof org.bukkit.entity.Minecart) && isUnsafeVelocity(velocity)) {
|
||||||
+ CraftServer.excessiveVelEx = new Exception("Excessive velocity set detected: tried to set velocity of entity " + entity.getScoreboardName() + " id #" + getEntityId() + " to (" + velocity.getX() + "," + velocity.getY() + "," + velocity.getZ() + ").");
|
+ CraftServer.excessiveVelEx = new Exception("Excessive velocity set detected: tried to set velocity of entity " + entity.getScoreboardName() + " id #" + getEntityId() + " to (" + velocity.getX() + "," + velocity.getY() + "," + velocity.getZ() + ").");
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
Reference in New Issue
Block a user