When a player is riding a camel, their Y position is not only wrong, but it is constantly flickering between Y value of the vehicle and player's Y,
even when not moving at all. Video example.
When tested on a terrain with base height 74, when riding a camel, height in F3 shows 75.425, but API output flickers between 74 and 75.425.
This issue only affects 1.20.x Bukkit-based servers, it works fine on Fabric.
The result of Player#getLocation().getY() is only wrong when accessed asychronously.
When accessed in the server thread, it returns the vehicle's Y instead of player's.
However, when using a command, it is still sometimes wrong even though commands are processed in server thread.
On pigs, player's height properly reflects what F3 says.
On donkeys, base Y is returned instead (74) and value sometimes flickers even in sync access. Example sequence:
Frame 1:
Frame 2:
Frame 3:
Haven't tested other animals.