From 58636c2dd8e756f3c7fa88be07fe1a692c18fa42 Mon Sep 17 00:00:00 2001 From: Travis Watkins Date: Sun, 18 Nov 2012 10:51:52 -0600 Subject: [PATCH] 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. --- src/main/java/org/bukkit/craftbukkit/CraftServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index e757b437e7..429320bfba 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1178,7 +1178,7 @@ public final class CraftServer implements Server { Set players = new HashSet(); 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()));