classinternallombokSource
public class Level

level.dat Null means it wasn't in the file (and won't be after saving either), stuff we don't know about (version_history, mod data, ...) is left alone

Constructors

public Level()

Methods

Level fromNbt(NbtCompound)int getDataVersion()Returns the dataVersion value.Difficulty getDifficulty()Returns the difficulty value.String[] getDisabledDatapacks()Returns the disabledDatapacks value.String[] getEnabledDatapacks()Returns the enabledDatapacks value.String[] getEnabledFeatures()Returns the enabledFeatures value.int getGameType()Returns the gameType value.byte getInitialized()Returns the initialized value.long getLastPlayed()Returns the lastPlayed value.String getLevelName()Returns the levelName value.int getNbtVersion()Returns the nbtVersion value.String[] getServerBrands()Returns the serverBrands value.UUID getSingleplayerUuid()Returns the singleplayerUuid value.Spawn getSpawn()Returns the spawn value.long getTime()Returns the time value.Version getVersion()Returns the version value.boolean isAllowCommands()Returns the allowCommands value.boolean isHardcore()Returns the hardcore value.boolean isLocked()Returns the locked value.boolean isModded()Returns the modded value.void setAllowCommands(boolean)Sets the allowCommands value.void setDataVersion(int)Sets the dataVersion value.void setDifficulty(Difficulty)Sets the difficulty value.void setDisabledDatapacks(String[])Sets the disabledDatapacks value.void setEnabledDatapacks(String[])Sets the enabledDatapacks value.void setEnabledFeatures(String[])Sets the enabledFeatures value.void setGameType(int)Sets the gameType value.void setHardcore(boolean)Sets the hardcore value.void setInitialized(byte)Sets the initialized value.void setLastPlayed(long)Sets the lastPlayed value.void setLevelName(String)Sets the levelName value.void setLocked(boolean)Sets the locked value.void setModded(boolean)Sets the modded value.void setNbtVersion(int)Sets the nbtVersion value.void setServerBrands(String[])Sets the serverBrands value.void setSingleplayerUuid(UUID)Sets the singleplayerUuid value.void setSpawn(Spawn)Sets the spawn value.void setTime(long)Sets the time value.void setVersion(Version)Sets the version value.NbtCompound toNbt()Everything fromNbt read, with your changes on top
public static Level fromNbt(NbtCompound nbt)
Parameters
nbtNbtCompound
Returns
Level
public int getDataVersion()

Returns the dataVersion value.

Returns
int

Generated by Lombok's @Getter for the field dataVersion

public Difficulty getDifficulty()

Returns the difficulty value.

Returns
Difficulty

Generated by Lombok's @Getter for the field difficulty

public String[] getDisabledDatapacks()

Returns the disabledDatapacks value.

Returns
String[]

Generated by Lombok's @Getter for the field disabledDatapacks

public String[] getEnabledDatapacks()

Returns the enabledDatapacks value.

Returns
String[]

Generated by Lombok's @Getter for the field enabledDatapacks

public String[] getEnabledFeatures()

Returns the enabledFeatures value.

Returns
String[]

Generated by Lombok's @Getter for the field enabledFeatures

public int getGameType()

Returns the gameType value.

Returns
int

Generated by Lombok's @Getter for the field gameType

public byte getInitialized()

Returns the initialized value.

Returns
byte

Generated by Lombok's @Getter for the field initialized

public long getLastPlayed()

Returns the lastPlayed value.

Returns
long

Generated by Lombok's @Getter for the field lastPlayed

public String getLevelName()

Returns the levelName value.

Returns
String

Generated by Lombok's @Getter for the field levelName

public int getNbtVersion()

Returns the nbtVersion value.

Returns
int

Generated by Lombok's @Getter for the field nbtVersion

public String[] getServerBrands()

Returns the serverBrands value.

Returns
String[]

Generated by Lombok's @Getter for the field serverBrands

public UUID getSingleplayerUuid()

Returns the singleplayerUuid value.

Returns
UUID

Generated by Lombok's @Getter for the field singleplayerUuid

public Spawn getSpawn()

Returns the spawn value.

Returns
Spawn

Generated by Lombok's @Getter for the field spawn

public long getTime()

Returns the time value.

Returns
long

Generated by Lombok's @Getter for the field time

public Version getVersion()

Returns the version value.

Returns
Version

Generated by Lombok's @Getter for the field version

public boolean isAllowCommands()

Returns the allowCommands value.

Returns
boolean

Generated by Lombok's @Getter for the field allowCommands

public boolean isHardcore()

Returns the hardcore value.

Returns
boolean

Generated by Lombok's @Getter for the field hardcore

public boolean isLocked()

Returns the locked value.

Returns
boolean

Generated by Lombok's @Getter for the field locked

public boolean isModded()

Returns the modded value.

Returns
boolean

Generated by Lombok's @Getter for the field modded

public void setAllowCommands(boolean allowCommands)

Sets the allowCommands value.

Parameters
allowCommandsboolean

Generated by Lombok's @Setter for the field allowCommands

public void setDataVersion(int dataVersion)

Sets the dataVersion value.

Parameters
dataVersionint

Generated by Lombok's @Setter for the field dataVersion

public void setDifficulty(Difficulty difficulty)

Sets the difficulty value.

Parameters
difficultyDifficulty

Generated by Lombok's @Setter for the field difficulty

public void setDisabledDatapacks(String[] disabledDatapacks)

Sets the disabledDatapacks value.

Parameters
disabledDatapacksString[]

Generated by Lombok's @Setter for the field disabledDatapacks

public void setEnabledDatapacks(String[] enabledDatapacks)

Sets the enabledDatapacks value.

Parameters
enabledDatapacksString[]

Generated by Lombok's @Setter for the field enabledDatapacks

public void setEnabledFeatures(String[] enabledFeatures)

Sets the enabledFeatures value.

Parameters
enabledFeaturesString[]

Generated by Lombok's @Setter for the field enabledFeatures

public void setGameType(int gameType)

Sets the gameType value.

Parameters
gameTypeint

Generated by Lombok's @Setter for the field gameType

public void setHardcore(boolean hardcore)

Sets the hardcore value.

Parameters
hardcoreboolean

Generated by Lombok's @Setter for the field hardcore

public void setInitialized(byte initialized)

Sets the initialized value.

Parameters
initializedbyte

Generated by Lombok's @Setter for the field initialized

public void setLastPlayed(long lastPlayed)

Sets the lastPlayed value.

Parameters
lastPlayedlong

Generated by Lombok's @Setter for the field lastPlayed

public void setLevelName(String levelName)

Sets the levelName value.

Parameters
levelNameString

Generated by Lombok's @Setter for the field levelName

public void setLocked(boolean locked)

Sets the locked value.

Parameters
lockedboolean

Generated by Lombok's @Setter for the field locked

public void setModded(boolean modded)

Sets the modded value.

Parameters
moddedboolean

Generated by Lombok's @Setter for the field modded

public void setNbtVersion(int nbtVersion)

Sets the nbtVersion value.

Parameters
nbtVersionint

Generated by Lombok's @Setter for the field nbtVersion

public void setServerBrands(String[] serverBrands)

Sets the serverBrands value.

Parameters
serverBrandsString[]

Generated by Lombok's @Setter for the field serverBrands

public void setSingleplayerUuid(UUID singleplayerUuid)

Sets the singleplayerUuid value.

Parameters
singleplayerUuidUUID

Generated by Lombok's @Setter for the field singleplayerUuid

public void setSpawn(Spawn spawn)

Sets the spawn value.

Parameters
spawnSpawn

Generated by Lombok's @Setter for the field spawn

public void setTime(long time)

Sets the time value.

Parameters
timelong

Generated by Lombok's @Setter for the field time

public void setVersion(Version version)

Sets the version value.

Parameters
versionVersion

Generated by Lombok's @Setter for the field version

public NbtCompound toNbt()
Everything fromNbt read, with your changes on top
Returns
NbtCompound