public final class LevelInfo extends Object
Modifier and Type | Field and Description |
---|---|
private boolean |
allowCommands |
private DataPackSettings |
dataPackSettings |
private Difficulty |
difficulty |
private GameMode |
gameMode |
private GameRules |
gameRules |
private boolean |
hardcore |
private String |
name |
Constructor and Description |
---|
LevelInfo(String name,
GameMode gameMode,
boolean hardcore,
Difficulty difficulty,
boolean allowCommands,
GameRules gameRules,
DataPackSettings dataPackSettings) |
Modifier and Type | Method and Description |
---|---|
boolean |
areCommandsAllowed() |
static LevelInfo |
fromDynamic(com.mojang.serialization.Dynamic<?> dynamic,
DataPackSettings dataPackSettings) |
DataPackSettings |
getDataPackSettings() |
Difficulty |
getDifficulty() |
GameMode |
getGameMode() |
GameRules |
getGameRules() |
String |
getLevelName() |
boolean |
isHardcore() |
LevelInfo |
withCopiedGameRules() |
LevelInfo |
withDataPackSettings(DataPackSettings dataPackSettings) |
LevelInfo |
withDifficulty(Difficulty difficulty) |
LevelInfo |
withGameMode(GameMode mode) |
private final String name
private final GameMode gameMode
private final boolean hardcore
private final Difficulty difficulty
private final boolean allowCommands
private final GameRules gameRules
private final DataPackSettings dataPackSettings
public LevelInfo(String name, GameMode gameMode, boolean hardcore, Difficulty difficulty, boolean allowCommands, GameRules gameRules, DataPackSettings dataPackSettings)
public static LevelInfo fromDynamic(com.mojang.serialization.Dynamic<?> dynamic, DataPackSettings dataPackSettings)
public String getLevelName()
public GameMode getGameMode()
public boolean isHardcore()
public Difficulty getDifficulty()
public boolean areCommandsAllowed()
public GameRules getGameRules()
public DataPackSettings getDataPackSettings()
public LevelInfo withDifficulty(Difficulty difficulty)
public LevelInfo withDataPackSettings(DataPackSettings dataPackSettings)
public LevelInfo withCopiedGameRules()