When moving between regions, Game.isLoggedIn() returns false.
I have a number of threads running which rely on the world being loaded, so I'd like to handle login/logout events to start/stop these threads.
I couldn't implement GameStateListener for some reason, and was implementing my own version of the listener when I discovered this issue.
My cheap mitigation for this is to check Game.getState() instead of Game.isLoggedIn() and ignore the case that state == Game.LOADING_REGION for the purposes of throwing login/logout events.
When moving between regions, Game.isLoggedIn() returns false.
I have a number of threads running which rely on the world being loaded, so I'd like to handle login/logout events to start/stop these threads.
I couldn't implement GameStateListener for some reason, and was implementing my own version of the listener when I discovered this issue.
My cheap mitigation for this is to check Game.getState() instead of Game.isLoggedIn() and ignore the case that state == Game.LOADING_REGION for the purposes of throwing login/logout events.