mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-23 11:15:24 +01:00
Fix for #2402 player record was deleted on quit
This was due to the changes to the Player cache. On quit the cache was cleared, but this was also deleting the player from the database.
This commit is contained in:
parent
156c3da3bb
commit
50244b7281
@ -160,7 +160,6 @@ public class User implements MetaDataAble {
|
||||
public static void removePlayer(Player player) {
|
||||
if (player != null) {
|
||||
users.remove(player.getUniqueId());
|
||||
BentoBox.getInstance().getPlayers().removePlayer(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,6 @@ public class UserTest {
|
||||
// If the player has been removed from the cache, then code will ask server for player
|
||||
// Return null and check if instance is null will show that the player is not in the cache
|
||||
when(Bukkit.getPlayer(any(UUID.class))).thenReturn(null);
|
||||
verify(pm).removePlayer(player);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user