Class LevelCreator.Builder
java.lang.Object
dev.wyck.level.LevelCreator.Builder
- Enclosing interface:
LevelCreator
Builder for
LevelCreator.- Since:
- 2.4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbonusChest(boolean bonusChest) Sets whether to generate a bonus chest in the world.build()Builds theLevelCreatorwith the specified properties.create()Creates a new bukkit world from the built level creator.dimension(ResourceKey resourceKey) Sets the dimension of the world.Sets the dimension of the world.environment(World.Environment environment) Sets the environment of the world.generateStructures(boolean generateStructures) Sets whether to generate structures in the world.generator(ChunkGenerator generator) Sets the chunk generator of the world.levelKey(ResourceKey levelKey) Alias ofresourceKey(ResourceKey)Sets the level stem of the world.Sets the name of the world.persistence(StemPersistence persistence) Deprecated, for removal: This API element is subject to removal in a future version.resourceKey(ResourceKey levelKey) Sets the resource key of the level stem.seed(long seed) Sets the seed of the world.spawner(LevelSpawner spawner) Adds a spawner to the world.spawners(LevelSpawner... spawners) Adds spawners to the world.spawners(List<LevelSpawner> spawners) Sets the spawners of the world.Sets the level stem of the world.Sets the type of the world.
-
Constructor Details
-
Builder
-
Builder
-
-
Method Details
-
resourceKey
Sets the resource key of the level stem.- Parameters:
levelKey- the resource key of the world- Returns:
- this builder
- Since:
- 2.4.0
-
levelStem
Sets the level stem of the world.- Parameters:
levelStem- the level stem of the world- Returns:
- this builder
- Since:
- 3.3.0
-
seed
Sets the seed of the world.- Parameters:
seed- the seed of the world- Returns:
- this builder
- Since:
- 2.4.0
-
generateStructures
Sets whether to generate structures in the world.- Parameters:
generateStructures- whether to generate structures in the world- Returns:
- this builder
- Since:
- 2.4.0
-
bonusChest
Sets whether to generate a bonus chest in the world.- Parameters:
bonusChest- whether to generate a bonus chest in the world- Returns:
- this builder
- Since:
- 2.4.0
-
environment
Sets the environment of the world.- Parameters:
environment- the environment of the world- Returns:
- this builder
- Since:
- 2.4.0
-
persistence
@AsOf("2.4.0") @Deprecated(forRemoval=true, since="3.3.0") @ScheduledForRemoval(inVersion="3.4.0") public LevelCreator.Builder persistence(StemPersistence persistence) Deprecated, for removal: This API element is subject to removal in a future version.UseLevelCreator.levelStem()andRegisterable.register()instead.Sets the persistence of the world.- Parameters:
persistence- the persistence of the world- Returns:
- this builder
- Since:
- 2.4.0
-
spawners
Sets the spawners of the world.- Parameters:
spawners- the spawners of the world- Returns:
- this builder
- Since:
- 2.4.0
-
name
Sets the name of the world.- Parameters:
name- the name of the world, or null to use the default name- Returns:
- this builder
- Since:
- 3.0.0
-
type
Sets the type of the world.- Parameters:
type- the type of the world- Returns:
- this builder
- Since:
- 3.3.0
-
levelKey
Alias ofresourceKey(ResourceKey)- Parameters:
levelKey- the resource key of the world- Returns:
- this builder
- Since:
- 2.4.0
-
spawner
Adds a spawner to the world.- Parameters:
spawner- the spawner to add- Returns:
- this builder
- Since:
- 2.4.0
-
spawners
Adds spawners to the world.- Parameters:
spawners- the spawners to add- Returns:
- this builder
- Since:
- 3.0.0
-
dimension
Sets the dimension of the world.- Parameters:
dimension- the dimension of the world- Returns:
- this builder
- Since:
- 2.4.0
-
dimension
Sets the dimension of the world.- Parameters:
resourceKey- the resource key of the dimension- Returns:
- this builder
- Since:
- 2.4.0
-
generator
Sets the chunk generator of the world.- Parameters:
generator- the chunk generator of the world- Returns:
- this builder
- Since:
- 2.4.0
-
stem
Sets the level stem of the world.- Parameters:
levelStem- the level stem of the world- Returns:
- this builder
- Since:
- 3.3.0
-
build
Builds theLevelCreatorwith the specified properties.- Returns:
- the constructed level creator
- Since:
- 2.4.0
-
create
Creates a new bukkit world from the built level creator.- Returns:
- a new
Worldfrom the builtLevelCreator - Since:
- 2.4.0
-
LevelCreator.levelStem()andRegisterable.register()instead.