public static interface WorldArchetype.Builder extends ResettableBuilder<WorldArchetype,WorldArchetype.Builder>
| Modifier and Type | Method and Description |
|---|---|
WorldArchetype |
build(String id,
String name)
Builds the
WorldArchetype which can be used to create
a World in Server.createWorldProperties(String, WorldArchetype). |
WorldArchetype.Builder |
commandsAllowed(boolean state)
Sets whether commands are allowed to be executed.
|
WorldArchetype.Builder |
difficulty(Difficulty difficulty)
Sets the difficulty.
|
WorldArchetype.Builder |
dimension(DimensionType type)
Sets the dimension type.
|
WorldArchetype.Builder |
enabled(boolean state)
Sets enabled status.
|
WorldArchetype.Builder |
from(WorldProperties properties)
Fills this
WorldArchetype.Builder for creating WorldArchetypes,
the builder is then seeded with the values from the given
WorldProperties object. |
WorldArchetype.Builder |
gameMode(GameMode gameMode)
Sets the default
GameMode. |
WorldArchetype.Builder |
generateBonusChest(boolean state)
Sets whether the bonus chest should be created.
|
WorldArchetype.Builder |
generateSpawnOnLoad(boolean state)
Sets whether the spawn chunks generate on load.
|
WorldArchetype.Builder |
generator(GeneratorType type)
Sets the generator type.
|
WorldArchetype.Builder |
generatorModifiers(WorldGeneratorModifier... modifier)
Sets the generator modifiers.
|
WorldArchetype.Builder |
generatorSettings(DataContainer settings)
Sets any extra settings required by the
GeneratorType or by
the WorldGeneratorModifiers. |
WorldArchetype.Builder |
hardcore(boolean state)
Sets whether hardcore mode is enabled.
|
WorldArchetype.Builder |
keepsSpawnLoaded(boolean state)
Sets whether the spawn chunks should remain loaded when
no players are present.
|
WorldArchetype.Builder |
loadsOnStartup(boolean state)
Sets whether to load when the server starts.
|
WorldArchetype.Builder |
portalAgent(PortalAgentType type)
Sets the desired
PortalAgentType for the world. |
WorldArchetype.Builder |
pvp(boolean state)
Sets whether PVP combat is enabled in this world.
|
WorldArchetype.Builder |
randomSeed()
Sets the seed to be randomized for each world created.
|
WorldArchetype.Builder |
seed(long seed)
Sets the seed.
|
WorldArchetype.Builder |
serializationBehavior(SerializationBehavior behavior)
Sets the serialization behavior that will be used when saving.
|
WorldArchetype.Builder |
usesMapFeatures(boolean state)
Sets whether this should generate map features such as villages
and strongholds.
|
from, resetWorldArchetype.Builder enabled(boolean state)
Entity.transferToWorld(org.spongepowered.api.world.World) .state - Should be enabledWorldArchetype.Builder loadsOnStartup(boolean state)
state - Should load on startupWorldArchetype.Builder keepsSpawnLoaded(boolean state)
state - Should keep spawn loadedWorldArchetype.Builder generateSpawnOnLoad(boolean state)
state - Should generate spawn chunks on loadWorldArchetype.Builder seed(long seed)
randomSeed() if a random seed is desired.seed - The seedWorldArchetype.Builder randomSeed()
WorldArchetype.Builder gameMode(GameMode gameMode)
GameMode. If not specified this
will default to GameModes.SURVIVAL.gameMode - The gamemodeWorldArchetype.Builder generator(GeneratorType type)
GeneratorTypes.DEFAULTtype - The typeWorldArchetype.Builder generatorModifiers(WorldGeneratorModifier... modifier)
modifier - The modifiersIllegalArgumentException - If one of the modifiers is not
registered in GameRegistry.WorldArchetype.Builder dimension(DimensionType type)
type - The typeWorldArchetype.Builder difficulty(Difficulty difficulty)
difficulty - The difficultyWorldArchetype.Builder usesMapFeatures(boolean state)
state - Are map features enabledWorldArchetype.Builder hardcore(boolean state)
state - Is hardcore mode enabledWorldArchetype.Builder generatorSettings(DataContainer settings)
GeneratorType or by
the WorldGeneratorModifiers. If not specified these will
default to the settings within GeneratorType.getGeneratorSettings().settings - The generator settingsWorldArchetype.Builder portalAgent(PortalAgentType type)
PortalAgentType for the world.type - The typeWorldArchetype.Builder pvp(boolean state)
state - Whether PVP is enabledWorldArchetype.Builder commandsAllowed(boolean state)
state - Whether commands are allowedWorldArchetype.Builder generateBonusChest(boolean state)
state - Whether bonus chest is enabledWorldArchetype.Builder serializationBehavior(SerializationBehavior behavior)
behavior - The serialization behaviorWorldArchetype.Builder from(WorldProperties properties)
WorldArchetype.Builder for creating WorldArchetypes,
the builder is then seeded with the values from the given
WorldProperties object.properties - The seed propertiesWorldArchetype build(String id, String name) throws IllegalArgumentException, CatalogTypeAlreadyRegisteredException
WorldArchetype which can be used to create
a World in Server.createWorldProperties(String, WorldArchetype).
This will also register the settings as a new type in the
GameRegistry.
id - The id that this settings will be registered undername - The human readable name of this settingsIllegalArgumentExceptionCatalogTypeAlreadyRegisteredException