@ThreadSafe public interface WorldSettings
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
|
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
|
long seed()
Difficulty difficulty()
void setDifficulty(Difficulty difficulty)
difficulty
- the difficultyGameMode defaultGameMode()
void setGameMode(GameMode gameMode)
gameMode
- the world gamemodeboolean isRule(String rule)
Set<String> gameRules()
boolean allowPvp()
true
to allow, false
to disallowvoid setAllowPvp(boolean enable)
enable
- true
to allow, false
to disallowboolean generateStructures()
Copyright © 2016. All rights reserved.