|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bukkit.WorldCreator
public class WorldCreator
Represents various types of options that may be used to create a world.
Constructor Summary | |
---|---|
WorldCreator(String name)
Creates an empty WorldCreationOptions for the given world name |
Method Summary | |
---|---|
WorldCreator |
copy(World world)
Copies the options from the specified world |
WorldCreator |
copy(WorldCreator creator)
Copies the options from the specified WorldCreator |
World |
createWorld()
Creates a world with the specified options. |
World.Environment |
environment()
Gets the environment that will be used to create or load the world |
WorldCreator |
environment(World.Environment env)
Sets the environment that will be used to create or load the world |
boolean |
generateStructures()
Gets whether or not structures will be generated in the world. |
WorldCreator |
generateStructures(boolean generate)
Sets whether or not worlds created or loaded with this creator will have structures. |
ChunkGenerator |
generator()
Gets the generator that will be used to create or load the world. |
WorldCreator |
generator(ChunkGenerator generator)
Sets the generator that will be used to create or load the world. |
WorldCreator |
generator(String generator)
Sets the generator that will be used to create or load the world. |
WorldCreator |
generator(String generator,
CommandSender output)
Sets the generator that will be used to create or load the world. |
static ChunkGenerator |
getGeneratorForName(String world,
String name,
CommandSender output)
Attempts to get the ChunkGenerator with the given name. |
String |
name()
Gets the name of the world that is to be loaded or created. |
static WorldCreator |
name(String name)
Creates a new WorldCreator for the given world name |
long |
seed()
Gets the seed that will be used to create this world |
WorldCreator |
seed(long seed)
Sets the seed that will be used to create this world |
WorldType |
type()
Gets the type of the world that will be created or loaded |
WorldCreator |
type(WorldType type)
Sets the type of the world that will be created or loaded |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WorldCreator(String name)
name
- Name of the world that will be createdMethod Detail |
---|
public WorldCreator copy(World world)
world
- World to copy options from
public WorldCreator copy(WorldCreator creator)
WorldCreator
creator
- World creator to copy options from
public String name()
public long seed()
public WorldCreator seed(long seed)
seed
- World seed
public World.Environment environment()
public WorldCreator environment(World.Environment env)
env
- World environment
public WorldType type()
public WorldCreator type(WorldType type)
type
- World type
public ChunkGenerator generator()
public WorldCreator generator(ChunkGenerator generator)
generator
- Chunk generator
public WorldCreator generator(String generator)
generator
- Name of the generator to use, in "plugin:id" notation
public WorldCreator generator(String generator, CommandSender output)
generator
- Name of the generator to use, in "plugin:id" notationoutput
- CommandSender
that will receive any error messages
public WorldCreator generateStructures(boolean generate)
generate
- Whether to generate structures
public boolean generateStructures()
public World createWorld()
public static WorldCreator name(String name)
WorldCreator
for the given world name
name
- Name of the world to load or create
public static ChunkGenerator getGeneratorForName(String world, String name, CommandSender output)
ChunkGenerator
with the given name.
If the generator is not found, null will be returned and a message will be
printed to the specified CommandSender
explaining why.
The name must be in the "plugin:id" notation, or optionally just "plugin",
where "plugin" is the safe-name of a plugin and "id" is an optional unique
identifier for the generator you wish to request from the plugin.
world
- Name of the world this will be used forname
- Name of the generator to retrieveoutput
- Where to output if errors are present
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |