From bdc5fc8beb3be494cd03931204a230a0425b8945 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Fri, 5 Dec 2014 19:33:13 +0100 Subject: [PATCH] added generator settings to WorldCreator to specify presets for FLAT or CUSTOMIZED world types By: TheCutter --- .../main/java/org/bukkit/WorldCreator.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/WorldCreator.java b/paper-api/src/main/java/org/bukkit/WorldCreator.java index 9a5afd2db7..53980fdbc6 100644 --- a/paper-api/src/main/java/org/bukkit/WorldCreator.java +++ b/paper-api/src/main/java/org/bukkit/WorldCreator.java @@ -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.