Code:
How to solve it?
Java:
List<Entity> allEntities = new ArrayList<>();
for (World world : Bukkit.getServer().getWorlds()) {
allEntities.addAll(world.getEntities());
}
How to solve it?