mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-29 06:05:13 +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) {
|
if (playerUUID == null) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
return names.loadObjects().stream().filter(n -> n.getUuid().equals(playerUUID)).findFirst()
|
getPlayer(playerUUID);
|
||||||
.map(Names::getUniqueId).orElse("");
|
return playerCache.get(playerUUID).getPlayerName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user