public class WorldCreator
extends java.lang.Object
构造器和说明 |
---|
WorldCreator(java.lang.String name)
为指定世界的名称创建一个空的WorldCreationOptions类型。
|
限定符和类型 | 方法和说明 |
---|---|
WorldCreator |
copy(World world)
从指定的世界复制设置。
|
WorldCreator |
copy(WorldCreator creator)
从指定的
WorldCreator 复制设置。 |
World |
createWorld()
使用指定的设置创建一个世界。
|
World.Environment |
environment()
获取用于创建或加载世界的环境。
|
WorldCreator |
environment(World.Environment env)
设置用于创建或加载世界的环境。
|
boolean |
generateStructures()
获取世界是否生成建筑。
|
WorldCreator |
generateStructures(boolean generate)
设置被这个生成器创建或加载的世界是否会拥有建筑。
|
ChunkGenerator |
generator()
获取用于创建或加载世界的生成器。
|
WorldCreator |
generator(ChunkGenerator generator)
设置将被用于创建或加载世界的生成器。
|
WorldCreator |
generator(java.lang.String generator)
设置将被用于创建或加载世界的生成器。
|
WorldCreator |
generator(java.lang.String generator,
CommandSender output)
设置将用于创建或加载的生成器。
|
java.lang.String |
generatorSettings()
获取将被创建或加载的世界的生成器的配置。
|
WorldCreator |
generatorSettings(java.lang.String generatorSettings)
设置将被用于创建或加载世界的生成器的配置。
|
static ChunkGenerator |
getGeneratorForName(java.lang.String world,
java.lang.String name,
CommandSender output)
试图使用指定的名称获取
ChunkGenerator 。 |
java.lang.String |
name()
获取被加载或创建的世界的名称。
|
static WorldCreator |
name(java.lang.String name)
为指定的世界名创建一个新的
WorldCreator 。 |
long |
seed()
获取用于创建这个世界的种子。
|
WorldCreator |
seed(long seed)
设置用于创建这个世界的种子。
|
WorldType |
type()
获取将被创建或加载的世界的类型。
|
WorldCreator |
type(WorldType type)
设置将被创建或加载的世界的类型。
|
public WorldCreator(java.lang.String name)
原文: Creates an empty WorldCreationOptions for the given world name
name
- 将被创建的世界的名称public WorldCreator copy(World world)
原文: Copies the options from the specified world
world
- 用于复制设置的世界来源public WorldCreator copy(WorldCreator creator)
WorldCreator
复制设置。
原文:
Copies the options from the specified WorldCreator
creator
- 用于复制设置的世界来源public java.lang.String name()
原文: Gets the name of the world that is to be loaded or created.
public long seed()
原文: Gets the seed that will be used to create this world
public WorldCreator seed(long seed)
原文: Sets the seed that will be used to create this world
seed
- 世界种子public World.Environment environment()
原文: Gets the environment that will be used to create or load the world
public WorldCreator environment(World.Environment env)
原文: Sets the environment that will be used to create or load the world
env
- 世界的环境public WorldType type()
原文: Gets the type of the world that will be created or loaded
public WorldCreator type(WorldType type)
原文: Sets the type of the world that will be created or loaded
type
- 世界的类型public ChunkGenerator generator()
可能为null值,在这种情况下会使用这个环境的"natural"型生成器。
原文: 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.
public WorldCreator generator(ChunkGenerator generator)
可能为null值,在这种情况下会使用这个环境的"natural"型生成器。
原文: 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.
generator
- 区块生成器public WorldCreator generator(java.lang.String generator)
可能为null值,在这种情况下会使用这个环境的"natural"型生成器。
如果找不到指定名字的生成器,就会使用自然环境生成器以代替并且会在控制台上输出一个警告。
原文: 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.
generator
- 使用的生成器的名字,形式为"plugin:id"public WorldCreator generator(java.lang.String generator, CommandSender output)
可能为null值,在这种情况下会使用这个环境的"natural"型生成器。
如果找不到指定名字的生成器,就会使用自然环境生成器以代替并且会在控制台上输出一个警告。
原文: 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
generator
- 使用的生成器的名字,形式为"plugin:id"output
- 将用于接受任何错误信息的CommandSender
public WorldCreator generatorSettings(java.lang.String generatorSettings)
原文: Sets the generator settings of the world that will be created or loaded
generatorSettings
- 将被使用的生成器的配置public java.lang.String generatorSettings()
原文: Gets the generator settings of the world that will be created or loaded
public WorldCreator generateStructures(boolean generate)
原文: Sets whether or not worlds created or loaded with this creator will have structures.
generate
- 是否生成建筑public boolean generateStructures()
原文: Gets whether or not structures will be generated in the world.
public World 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.
public static WorldCreator name(java.lang.String name)
WorldCreator
。
原文:
Creates a new WorldCreator
for the given world name
name
- 加载或创建的世界名public static ChunkGenerator getGeneratorForName(java.lang.String world, java.lang.String name, CommandSender output)
ChunkGenerator
。
如果生成器找不到,则会返回null并会向指定的CommandSender
输出一条信息来解释原因。
名称的形式必须为"plugin:id"或"plugin"形式,请求的插件的"plugin"为一个插件的安全名称并且"id"是生成器的可选的唯一的标识符。
原文:
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.
world
- 将被使用的世界名name
- 检索的生成器的名字output
- 错误发生时的输出处