Cannot add to Territory on first login
Okervill opened this issue ยท 3 comments
The first time a player logs into the server, they can join a town but not be added to territories.
It gives the response "This player have never been on this server".
They need to leave and rejoin to be added.
Thanks for reporting this. I suspect this is from my misunderstanding the usage of Player#hasPlayedBefore(). There was a period of time where I was under the impression that this method would tell you if a player had ever logged in, period. So, on first login, I thought it would start to return true. However, it seems the intended usage of it is a way to tell if the current login is the players first login.
I was made aware of this misconception a while ago but thought I'd tracked down all my misuses of it. Apparently not. I'll get that fixed.
Thanks again.
this is closed in commit 4a0d3f0