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()
WorldSettingsdefaultGameMode in interface WorldSettingspublic void setGameMode(GameMode gameMode)
WorldSettingssetGameMode in interface WorldSettingsgameMode - the world gamemodepublic LevelType levelType()
WorldSettingslevelType in interface WorldSettingspublic long seed()
WorldSettingsseed in interface WorldSettingspublic Dimension dimension()
WorldSettingsdimension in interface WorldSettingspublic Difficulty difficulty()
WorldSettingsdifficulty in interface WorldSettingspublic void setDifficulty(Difficulty difficulty)
WorldSettingssetDifficulty in interface WorldSettingsdifficulty - the difficultypublic boolean isRule(String rule)
WorldSettingsisRule in interface WorldSettingspublic Set<String> gameRules()
WorldSettingsgameRules in interface WorldSettingspublic boolean allowPvp()
WorldSettingsallowPvp in interface WorldSettingstrue to allow, false to disallowpublic void setAllowPvp(boolean enable)
WorldSettingssetAllowPvp in interface WorldSettingsenable - true to allow, false to disallowpublic boolean generateStructures()
WorldSettingsgenerateStructures in interface WorldSettingsCopyright © 2016. All rights reserved.