mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-25 12:15:12 +01:00
Do not load all players just to get a name.
This commit is contained in:
parent
ca15740a8c
commit
8b0a5a3d0b
@ -157,8 +157,8 @@ public class PlayersManager {
|
||||
if (playerUUID == null) {
|
||||
return "";
|
||||
}
|
||||
return names.loadObjects().stream().filter(n -> n.getUuid().equals(playerUUID)).findFirst()
|
||||
.map(Names::getUniqueId).orElse("");
|
||||
getPlayer(playerUUID);
|
||||
return playerCache.get(playerUUID).getPlayerName();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user