Some plugins might occasionally set a players velocity to something like (x, y, NaN) due to invalid mathematic operations or to held a player mid air.
If applying such a velocity vector while the player is sneaking, the server crashes.
@EventHandler
public void onInteract(PlayerInteractEvent event) {
final Player player = event.getPlayer();
player.setSneaking(true);
player.setVelocity(new Vector(Double.NaN, 0, 0));
}
Plugin List
ViaVersion (might be important here)
Server Version
74ed0ea
Other
No response
Agreements
[X] You were able to find this issue on the latest version of NachoSpigot.
[X] You have confirmed that there aren’t any issues open regarding this bug.
Observed Behavior
Some plugins might occasionally set a players velocity to something like (x, y, NaN) due to invalid mathematic operations or to held a player mid air. If applying such a velocity vector while the player is sneaking, the server crashes.
Expected Behavior
Not to crash.
Steps To Reproduce
Plugin List
ViaVersion (might be important here)
Server Version
74ed0ea
Other
No response
Agreements