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:
tastybento 2024-06-10 16:15:40 -07:00
parent 156c3da3bb
commit 50244b7281
2 changed files with 0 additions and 2 deletions

View File

@ -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);
}
}

View File

@ -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