mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-24 01:47:42 +01:00
Don't do case lookups when we have the right case already.
This is a missed part of the original "[Bleeding] Use case from player data for OfflinePlayer. Fixes BUKKIT-519" commit. It avoids doing (somewhat expensive) lookups of player data to find the correct capitalization inside getOfflinePlayers() as we're already loading their name from the player data and thus have the correct capitalization.
This commit is contained in:
parent
1044c32a54
commit
58636c2dd8
@ -1178,7 +1178,7 @@ public final class CraftServer implements Server {
|
||||
Set<OfflinePlayer> players = new HashSet<OfflinePlayer>();
|
||||
|
||||
for (String file : files) {
|
||||
players.add(getOfflinePlayer(file.substring(0, file.length() - 4)));
|
||||
players.add(getOfflinePlayer(file.substring(0, file.length() - 4), false));
|
||||
}
|
||||
players.addAll(Arrays.asList(getOnlinePlayers()));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user