From 483a619e8add1abe758998deb90af2b00eede649 Mon Sep 17 00:00:00 2001 From: Andrew Ardill Date: Mon, 2 Jan 2012 10:25:43 +1100 Subject: [PATCH] FIX: CraftServer.getOfflinePlayers was not converting set->array well. An incorrect method was being used to convert from Set to OfflinePlayer[]. Relates to BUKIT-404 --- 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 ea85cb6e5f..9709a72fde 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -938,6 +938,6 @@ public final class CraftServer implements Server { } players.addAll(Arrays.asList(getOnlinePlayers())); - return (OfflinePlayer[]) players.toArray(); + return players.toArray(new OfflinePlayer[players.size()]); } }