This has been bothering me for quite some time with getting the location; how is it that with the groovy scripts you can grab the location without the position being null, but yet in java it is null?
Is it just how you set it up within the script package?
Since I feel like I kind of said this once already...
The player does not have a Position component. There is no Position component on the player. Other entities have Position components but not the player.
That's why the player doesn't have any position. Players are dealt with differently than other objects in the version you use.
The more complicated solution that breaks for sure with the next version is already embedded in the groovy scripts included with the game... and it is different on single player and multiplayer. But if you hunt down the getLocation() definitions you can find it.
I have a little trouble dumping support into the Java API because it's not a defined API, will break for certain with the next version, and I spent a lot of time making an easier API already that is less likely to break.