Fix for #2402 player record was deleted on quit (#2403)

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:16:00 -07:00 committed by GitHub
parent 156c3da3bb
commit 86e5a02516
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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