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