Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.WorldCreator Class Reference

Represents various types of options that may be used to create a world. More...

Public Member Functions

 WorldCreator (String name)
 Creates an empty WorldCreationOptions for the given world name.
 
WorldCreator copy (World world)
 Copies the options from the specified world.
 
WorldCreator copy (WorldCreator creator)
 Copies the options from the specified WorldCreator.
 
String name ()
 Gets the name of the world that is to be loaded or created.
 
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.
 
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.
 
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.
 
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.
 
WorldCreator generateStructures (boolean generate)
 Sets whether or not worlds created or loaded with this creator will have structures.
 
boolean generateStructures ()
 Gets whether or not structures will be generated in the world.
 
World createWorld ()
 Creates a world with the specified options.
 

Static Public Member Functions

static WorldCreator name (String name)
 Creates a new WorldCreator for the given world name.
 
static ChunkGenerator getGeneratorForName (String world, String name, CommandSender output)
 Attempts to get the ChunkGenerator with the given name.
 

Detailed Description

Represents various types of options that may be used to create a world.

Definition at line 11 of file WorldCreator.java.

Constructor & Destructor Documentation

org.bukkit.WorldCreator.WorldCreator ( String  name)

Creates an empty WorldCreationOptions for the given world name.

Parameters
nameName of the world that will be created

Definition at line 24 of file WorldCreator.java.

References org.bukkit.WorldCreator.name(), and org.bukkit.WorldCreator.seed().

Referenced by org.bukkit.WorldCreator.name().

Member Function Documentation

WorldCreator org.bukkit.WorldCreator.copy ( World  world)

Copies the options from the specified world.

Parameters
worldWorld to copy options from
Returns
This object, for chaining

Definition at line 39 of file WorldCreator.java.

References org.bukkit.WorldCreator.environment(), org.bukkit.WorldCreator.generator(), org.bukkit.World.getEnvironment(), org.bukkit.World.getGenerator(), org.bukkit.World.getSeed(), and org.bukkit.WorldCreator.seed().

WorldCreator org.bukkit.WorldCreator.copy ( WorldCreator  creator)

Copies the options from the specified WorldCreator.

Parameters
creatorWorld creator to copy options from
Returns
This object, for chaining

Definition at line 57 of file WorldCreator.java.

References org.bukkit.WorldCreator.environment(), org.bukkit.WorldCreator.generator(), and org.bukkit.WorldCreator.seed().

World org.bukkit.WorldCreator.createWorld ( )

Creates a world with the specified options.

If the world already exists, it will be loaded from disk and some options may be ignored.

Returns
Newly created or loaded world

Definition at line 234 of file WorldCreator.java.

References org.bukkit.Bukkit.createWorld().

World.Environment org.bukkit.WorldCreator.environment ( )

Gets the environment that will be used to create or load the world.

Returns
World environment

Definition at line 104 of file WorldCreator.java.

Referenced by org.bukkit.WorldCreator.copy(), and org.bukkit.WorldCreator.environment().

WorldCreator org.bukkit.WorldCreator.environment ( World.Environment  env)

Sets the environment that will be used to create or load the world.

Parameters
envWorld environment
Returns
This object, for chaining

Definition at line 114 of file WorldCreator.java.

References org.bukkit.WorldCreator.environment().

WorldCreator org.bukkit.WorldCreator.generateStructures ( boolean  generate)

Sets whether or not worlds created or loaded with this creator will have structures.

Parameters
generateWhether to generate structures
Returns
This object, for chaining

Definition at line 211 of file WorldCreator.java.

References org.bukkit.WorldCreator.generateStructures().

boolean org.bukkit.WorldCreator.generateStructures ( )

Gets whether or not structures will be generated in the world.

Returns
True if structures will be generated

Definition at line 222 of file WorldCreator.java.

Referenced by org.bukkit.WorldCreator.generateStructures().

ChunkGenerator org.bukkit.WorldCreator.generator ( )

Gets the generator that will be used to create or load the world.

This may be null, in which case the "natural" generator for this environment will be used.

Returns
Chunk generator

Definition at line 149 of file WorldCreator.java.

Referenced by org.bukkit.WorldCreator.copy(), and org.bukkit.WorldCreator.generator().

WorldCreator org.bukkit.WorldCreator.generator ( ChunkGenerator  generator)

Sets the generator that will be used to create or load the world.

This may be null, in which case the "natural" generator for this environment will be used.

Parameters
generatorChunk generator
Returns
This object, for chaining

Definition at line 162 of file WorldCreator.java.

References org.bukkit.WorldCreator.generator().

WorldCreator org.bukkit.WorldCreator.generator ( String  generator)

Sets the generator that will be used to create or load the world.

This may be null, in which case the "natural" generator for this environment will be used.

If the generator cannot be found for the given name, the natural environment generator will be used instead and a warning will be printed to the console.

Parameters
generatorName of the generator to use, in "plugin:id" notation
Returns
This object, for chaining

Definition at line 180 of file WorldCreator.java.

References org.bukkit.Bukkit.getConsoleSender(), org.bukkit.WorldCreator.getGeneratorForName(), and org.bukkit.WorldCreator.name().

WorldCreator org.bukkit.WorldCreator.generator ( String  generator,
CommandSender  output 
)

Sets the generator that will be used to create or load the world.

This may be null, in which case the "natural" generator for this environment will be used.

If the generator cannot be found for the given name, the natural environment generator will be used instead and a warning will be printed to the specified output

Parameters
generatorName of the generator to use, in "plugin:id" notation
outputCommandSender that will receive any error messages
Returns
This object, for chaining

Definition at line 199 of file WorldCreator.java.

References org.bukkit.WorldCreator.getGeneratorForName(), and org.bukkit.WorldCreator.name().

static ChunkGenerator org.bukkit.WorldCreator.getGeneratorForName ( String  world,
String  name,
CommandSender  output 
)
static

Attempts to get the 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.

Parameters
worldName of the world this will be used for
nameName of the generator to retrieve
outputWhere to output if errors are present
Returns
Resulting generator, or null

Definition at line 263 of file WorldCreator.java.

References org.bukkit.Bukkit.getConsoleSender(), org.bukkit.plugin.Plugin.getDefaultWorldGenerator(), org.bukkit.plugin.Plugin.getDescription(), org.bukkit.plugin.PluginDescriptionFile.getFullName(), org.bukkit.plugin.PluginManager.getPlugin(), org.bukkit.Bukkit.getPluginManager(), org.bukkit.plugin.Plugin.isEnabled(), and org.bukkit.command.CommandSender.sendMessage().

Referenced by org.bukkit.WorldCreator.generator().

String org.bukkit.WorldCreator.name ( )

Gets the name of the world that is to be loaded or created.

Returns
World name

Definition at line 74 of file WorldCreator.java.

Referenced by org.bukkit.WorldCreator.generator(), and org.bukkit.WorldCreator.WorldCreator().

static WorldCreator org.bukkit.WorldCreator.name ( String  name)
static

Creates a new WorldCreator for the given world name.

Parameters
nameName of the world to load or create
Returns
Resulting WorldCreator

Definition at line 244 of file WorldCreator.java.

References org.bukkit.WorldCreator.WorldCreator().

long org.bukkit.WorldCreator.seed ( )

Gets the seed that will be used to create this world.

Returns
World seed

Definition at line 83 of file WorldCreator.java.

Referenced by org.bukkit.WorldCreator.copy(), org.bukkit.WorldCreator.seed(), and org.bukkit.WorldCreator.WorldCreator().

WorldCreator org.bukkit.WorldCreator.seed ( long  seed)

Sets the seed that will be used to create this world.

Parameters
seedWorld seed
Returns
This object, for chaining

Definition at line 93 of file WorldCreator.java.

References org.bukkit.WorldCreator.seed().

WorldType org.bukkit.WorldCreator.type ( )

Gets the type of the world that will be created or loaded.

Returns
World type

Definition at line 125 of file WorldCreator.java.

Referenced by org.bukkit.WorldCreator.type().

WorldCreator org.bukkit.WorldCreator.type ( WorldType  type)

Sets the type of the world that will be created or loaded.

Parameters
typeWorld type
Returns
This object, for chaining

Definition at line 135 of file WorldCreator.java.

References org.bukkit.WorldCreator.type().


The documentation for this class was generated from the following file: