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:
Travis Watkins 2012-11-18 10:51:52 -06:00
parent 1044c32a54
commit 58636c2dd8

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