let players walk if their position changes and not if they hold specific keys

> I would suggest changing that to the current pos of the player.

1. I had that before but then I thought that vector.equals(lastpos, pos) (line 180) would be always true because line 181 wouldn't be able to become arrived.
2. On some servers I noticed that after I joined I was at the zero point and then, when the stuff (e.g. the motd message) appeared, I was teleported to the position where I left the server.