diff options
author | Andrew Ardill <andrew.ardill@gmail.com> | 2012-01-02 10:25:43 +1100 |
---|---|---|
committer | Andrew Ardill <andrew.ardill@gmail.com> | 2012-01-02 10:25:43 +1100 |
commit | 483a619e8add1abe758998deb90af2b00eede649 (patch) | |
tree | f9046ab81ddab2728fc25534856afcbadd8bcdb8 | |
parent | bcdad9f837846de5fd81468acf8b9b8c7526ef83 (diff) | |
download | craftbukkit-483a619e8add1abe758998deb90af2b00eede649.tar craftbukkit-483a619e8add1abe758998deb90af2b00eede649.tar.gz craftbukkit-483a619e8add1abe758998deb90af2b00eede649.tar.lz craftbukkit-483a619e8add1abe758998deb90af2b00eede649.tar.xz craftbukkit-483a619e8add1abe758998deb90af2b00eede649.zip |
FIX: CraftServer.getOfflinePlayers was not converting set->array well.
An incorrect method was being used to convert from Set<OfflinePlayer>
to OfflinePlayer[].
Relates to BUKIT-404
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftServer.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index ea85cb6e..9709a72f 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()]); } } |