mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-23 11:15:24 +01:00
Switch removeIf check
May help with https://github.com/BentoBoxWorld/BentoBox/issues/1550 I cannot understand why an CME is happening with removeIf. It should not be possible.
This commit is contained in:
parent
ccb46dc72c
commit
f7f36179d3
@ -487,10 +487,9 @@ public class PlayersManager {
|
||||
*/
|
||||
public void removePlayer(Player player) {
|
||||
// Clear any players with the same name
|
||||
playerCache.values().removeIf(p -> p.getPlayerName().equalsIgnoreCase(player.getName()));
|
||||
playerCache.values().removeIf(p -> player.getName().equalsIgnoreCase(p.getPlayerName()));
|
||||
// Remove if the player's UUID is the same
|
||||
playerCache.values().removeIf(p -> p.getUniqueId().equals(player.getUniqueId().toString()));
|
||||
|
||||
playerCache.values().removeIf(p -> player.getUniqueId().toString().equals(p.getUniqueId()));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user