public final class WorldCreateOptions extends Object
Constructor and Description |
---|
WorldCreateOptions() |
Modifier and Type | Method and Description |
---|---|
boolean |
allowPvp() |
GameMode |
defaultGameMode()
Obtains the default gamemode of the world created using these options
|
Difficulty |
difficulty()
Obtains the difficulty of the world created using these options
|
WorldCreateOptions |
difficulty(Difficulty difficulty)
Sets the difficulty of the world to be generated
|
Dimension |
dimension()
Obtains the dimension of the world created using these options
|
WorldCreateOptions |
dimension(Dimension dimension)
Sets the dimension for the world generator
|
WorldCreateOptions |
gameMode(GameMode gameMode)
Sets the gamemode of the world to be generated
|
Map<GameRule,GameRule.Value> |
gameRules() |
boolean |
generateStructures() |
Class<? extends ChunkGenerator> |
generator() |
WorldCreateOptions |
generator(Class<? extends ChunkGenerator> generator)
Uses the specified generator to generate chunks in the world
|
boolean |
isRule(GameRule rule,
GameRule.Value value)
Checks whether the rule is enabled
|
WorldCreateOptions |
level(LevelType levelType)
Sets the leveltype of the world to be generated
|
LevelType |
levelType()
Obtains the level type of the world created using these options
|
WorldCreateOptions |
pvp(boolean enable)
Sets the PvP enabled flag
|
WorldCreateOptions |
rule(GameRule rule,
GameRule.Value value)
Sets the game rules of the world to be generated
|
long |
seed() |
WorldCreateOptions |
seed(long seed)
Sets the seed used to generate the world
|
WorldCreateOptions |
seed(String seed)
Sets the seed used to generate the world
|
WorldCreateOptions |
structures(boolean gen)
Sets whether or not to generate structures (caves, villages, etc)
|
public WorldCreateOptions()
public WorldCreateOptions dimension(Dimension dimension)
dimension
- the dimensionpublic WorldCreateOptions difficulty(Difficulty difficulty)
difficulty
- the difficultypublic WorldCreateOptions gameMode(GameMode gameMode)
gameMode
- the gamemodepublic WorldCreateOptions level(LevelType levelType)
levelType
- the leveltypepublic WorldCreateOptions rule(GameRule rule, GameRule.Value value)
rule
- the game rule to addvalue
- the game rule's parameter valuepublic WorldCreateOptions structures(boolean gen)
gen
- true
to generate structurespublic WorldCreateOptions pvp(boolean enable)
enable
- true
to allow pvppublic WorldCreateOptions generator(Class<? extends ChunkGenerator> generator)
generator
- the generator to usepublic WorldCreateOptions seed(String seed)
seed
- the seed used to generate the worldpublic WorldCreateOptions seed(long seed)
seed
- the seed used to generate the worldpublic Dimension dimension()
public Difficulty difficulty()
public GameMode defaultGameMode()
public LevelType levelType()
public boolean isRule(GameRule rule, GameRule.Value value)
rule
- the game ruletrue
if the game rule is equal to the provided argumentpublic Map<GameRule,GameRule.Value> gameRules()
public boolean generateStructures()
public boolean allowPvp()
public Class<? extends ChunkGenerator> generator()
public long seed()
Copyright © 2016. All rights reserved.