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.

By: Travis Watkins <amaranth@ubuntu.com>
This commit is contained in:
CraftBukkit/Spigot 2012-11-18 10:51:52 -06:00
parent ee562e8e61
commit 4ef13fbc4c

View file

@ -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()));