Fix for commands stopping working after logout

https://github.com/BentoBoxWorld/bentobox/issues/239

The player must be removed from the User cache on logout because the
player object becomes stale and if the player logs in again, they will
still have the old player object.
This commit is contained in:
tastybento 2018-08-19 11:46:36 -07:00
parent a82e8138c3
commit 4ca73385ca

View File

@ -59,5 +59,6 @@ public class JoinLeaveListener implements Listener {
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerQuit(final PlayerQuitEvent event) {
players.save(event.getPlayer().getUniqueId());
User.removePlayer(event.getPlayer());
}
}