for (WorldConfigurationNode worldNode : VanillaConfiguration.WORLDS.getAll()) {
if (worldNode.LOAD.getBoolean()) {
// Obtain generator and start generating world
String generatorName = worldNode.GENERATOR.getString();
VanillaGenerator generator = VanillaGenerators.byName(generatorName);
if (generator == null) {
throw new IllegalArgumentException("Invalid generator name for world '" + worldNode.getWorldName() + "': " + generatorName);
}
World world = ((Server) getEngine()).loadWorld(worldNode.getWorldName(), generator);