public class TridentWorldSettings extends Object implements WorldSettings
Constructor and Description |
---|
TridentWorldSettings() |
Modifier and Type | Method and Description |
---|---|
boolean |
allowPvp()
Obtains the boolean value indicating the allowance or disallowance of pvp
|
GameMode |
defaultGameMode()
Gets the default gamemode in a given chunk
|
Difficulty |
difficulty()
Gets the difficulty set in a world
|
Dimension |
dimension()
Gets the dimension of a world
|
Set<String> |
gameRules()
Obtains a list of the game rules applied to this world
|
boolean |
generateStructures()
Checks if structures are generated in a world (Stronghold, villages, dungeons)
|
boolean |
isRule(String rule)
Gets the set boolean for the given gamerule
|
LevelType |
levelType()
Gets the type of a world
|
static WorldSettings |
load(TridentWorld world,
WorldCreateOptions options) |
long |
seed()
Obtains the seed used to generate the world
|
void |
setAllowPvp(boolean enable)
Allows or disallows player vs.
|
void |
setDifficulty(Difficulty difficulty)
Sets the world difficulty
|
void |
setGameMode(GameMode gameMode)
Sets the world game mode
|
public TridentWorldSettings()
public static WorldSettings load(TridentWorld world, WorldCreateOptions options)
public GameMode defaultGameMode()
WorldSettings
defaultGameMode
in interface WorldSettings
public void setGameMode(GameMode gameMode)
WorldSettings
setGameMode
in interface WorldSettings
gameMode
- the world gamemodepublic LevelType levelType()
WorldSettings
levelType
in interface WorldSettings
public long seed()
WorldSettings
seed
in interface WorldSettings
public Dimension dimension()
WorldSettings
dimension
in interface WorldSettings
public Difficulty difficulty()
WorldSettings
difficulty
in interface WorldSettings
public void setDifficulty(Difficulty difficulty)
WorldSettings
setDifficulty
in interface WorldSettings
difficulty
- the difficultypublic boolean isRule(String rule)
WorldSettings
isRule
in interface WorldSettings
public Set<String> gameRules()
WorldSettings
gameRules
in interface WorldSettings
public boolean allowPvp()
WorldSettings
allowPvp
in interface WorldSettings
true
to allow, false
to disallowpublic void setAllowPvp(boolean enable)
WorldSettings
setAllowPvp
in interface WorldSettings
enable
- true
to allow, false
to disallowpublic boolean generateStructures()
WorldSettings
generateStructures
in interface WorldSettings
Copyright © 2016. All rights reserved.