Preserve whitelist ordering. Addresses BUKKIT-1805

By: Jeff Wardian <krinsdeath@hotmail.com>
This commit is contained in:
CraftBukkit/Spigot 2012-06-14 22:43:46 -05:00
parent fc5ec8c899
commit b92707d6ea

View file

@ -9,6 +9,7 @@ import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@ -1025,7 +1026,7 @@ public final class CraftServer implements Server {
}
public Set<OfflinePlayer> getWhitelistedPlayers() {
Set<OfflinePlayer> result = new HashSet<OfflinePlayer>();
Set<OfflinePlayer> result = new LinkedHashSet<OfflinePlayer>();
for (Object name : server.getWhitelisted()) {
result.add(getOfflinePlayer((String) name));