mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-28 13:45:14 +01:00
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:
parent
a82e8138c3
commit
4ca73385ca
@ -59,5 +59,6 @@ public class JoinLeaveListener implements Listener {
|
|||||||
@EventHandler(priority = EventPriority.NORMAL)
|
@EventHandler(priority = EventPriority.NORMAL)
|
||||||
public void onPlayerQuit(final PlayerQuitEvent event) {
|
public void onPlayerQuit(final PlayerQuitEvent event) {
|
||||||
players.save(event.getPlayer().getUniqueId());
|
players.save(event.getPlayer().getUniqueId());
|
||||||
|
User.removePlayer(event.getPlayer());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user