Perhaps this should be classified as major/private? It can cause a crash pretty easily depending on circumstances.
I was able to crash the server by doing the following while crouched:
p.setVelocity(new Vector(Double.NaN, Double.NaN, Double.NaN));
Tested on a freshly build Spigot with 0 plugin except for a barebones plugin to set my velocity to NaN. ONLY seems to happen when sneaking? I can't do it any other way, hangs immediately upon setting velocity while crouching.
A typical thread dump from this hang: https://hastebin.com/jigoyutaro.md - Sometimes has a few lines about BlockStairs and whatnot in there as well.
Proposed fix:
Adding this to the top of setVelocity in CraftEntity fixes the issue.
if (Double.isNaN(vel.getX())) vel.setX(0);
if (Double.isNaN(vel.getY())) vel.setY(0);
if (Double.isNaN(vel.getZ())) vel.setZ(0);
(Maybe set to current velocity if current isn't NaN? I tried doing this without the check and some players reported "Infinite ascension")
Perhaps add some sort of warning or message like the excessive velocity warning, but for NaN velocities?
Without this fix I was crashing 5-10 times a day, with the fix I haven't crashed in the last 72 hours. The cause of the NaN velocities was a misconfigured Mythic Mob, but this can still be an issue for other plugins that aren't safely checking velocities before setting them.