Skip to content

Class endstone::Level

ClassList > endstone > Level

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

  • #include <endstone/level/level.h>

Public Functions

Type Name
virtual std::vector< Actor * > getActors () const = 0
Get a list of all actors in this level.
virtual Dimension * getDimension (std::string name) const = 0
Gets the dimension with the given name.
virtual std::vector< Dimension * > getDimensions () const = 0
Gets a list of all dimensions within this level.
virtual std::string getName () const = 0
Gets the unique name of this level.
virtual int getTime () const = 0
Gets the relative in-game time of this level.
virtual void setTime (int time) = 0
Sets the relative in-game time on the server.
virtual ~Level () = default

Public Functions Documentation

function getActors

Get a list of all actors in this level.

virtual std::vector< Actor * > endstone::Level::getActors () const = 0

Returns:

A List of all actors currently residing in this level


function getDimension

Gets the dimension with the given name.

virtual Dimension * endstone::Level::getDimension (
    std::string name
) const = 0

Parameters:

  • name the name of the dimension to retrieve

Returns:

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


function getDimensions

Gets a list of all dimensions within this level.

virtual std::vector< Dimension * > endstone::Level::getDimensions () const = 0

Returns:

a list of dimensions


function getName

Gets the unique name of this level.

virtual std::string endstone::Level::getName () const = 0

Returns:

Name of this level


function getTime

Gets the relative in-game time of this level.

virtual int endstone::Level::getTime () const = 0

Returns:

The current relative time


function setTime

Sets the relative in-game time on the server.

virtual void endstone::Level::setTime (
    int time
) = 0

Parameters:

  • time The new relative time to set the in-game time to

function ~Level

virtual endstone::Level::~Level () = default


The documentation for this class was generated from the following file include/endstone/level/level.h