Skip to Content
⚠ Under Construction
ReferenceC++ APILevel

endstone::Level

Represents a level, which may contain actors, chunks and blocks.

Functions:

NameDescription
getActorsGet a list of all actors in this level.
getDimensionGets the dimension with the given name.
getDimensionsGets a list of all dimensions within this level.
getNameGets the unique name of this level.
getTimeGets the relative in-game time of this level.
setTimeSets the relative in-game time on the server.

getActors

std::vector<Actor *> getActors() const

Get a list of all actors in this level.

Returns:

A List of all actors currently residing in this level

getDimension

Dimension *getDimension(std::string name) const

Gets the dimension with the given name.

Parameters:

  • name the name of the dimension to retrieve. For example, “overworld”, “nether” or “the_end”.

Returns:

The Dimension with the given name, or nullptr if none exists

getDimensions

std::vector<Dimension *> getDimensions() const

Gets a list of all dimensions within this level.

Returns:

a list of dimensions

getName

std::string getName() const

Gets the unique name of this level.

Returns:

Name of this level

getTime

int getTime() const

Gets the relative in-game time of this level.

Returns:

The current relative time

setTime

void setTime(int time)

Sets the relative in-game time on the server.

Parameters:

  • time The new relative time to set the in-game time to
Last updated on