added generator settings to WorldCreator to specify presets for FLAT or CUSTOMIZED world types

By: TheCutter <info@thecutter.net>
This commit is contained in:
Bukkit/Spigot 2014-12-05 19:33:13 +01:00
parent 55bf7af698
commit bdc5fc8beb

View File

@ -15,6 +15,7 @@ public class WorldCreator {
private ChunkGenerator generator = null;
private WorldType type = WorldType.NORMAL;
private boolean generateStructures = true;
private String generatorSettings = "";
/**
* Creates an empty WorldCreationOptions for the given world name
@ -205,6 +206,27 @@ public class WorldCreator {
return this;
}
/**
* Sets the generator settings of the world that will be created or loaded
*
* @param generatorSettings The settings that should be used by the generator
* @return This object, for chaining
*/
public WorldCreator generatorSettings(String generatorSettings) {
this.generatorSettings = generatorSettings;
return this;
}
/**
* Gets the generator settings of the world that will be created or loaded
*
* @return The settings that should be used by the generator
*/
public String generatorSettings() {
return generatorSettings;
}
/**
* Sets whether or not worlds created or loaded with this creator will
* have structures.