Skip to content

Class endstone::MapView

ClassList > endstone > MapView

Represents a map item.

  • #include <endstone/map/map_view.h>

Public Types

Type Name
enum uint8_t Scale
An enum representing all possible scales a map can be set to.

Public Functions

Type Name
virtual void addRenderer (MapRenderer & renderer) = 0
Add a renderer to this map.
virtual int getCenterX () const = 0
Get the center X position of this map.
virtual int getCenterZ () const = 0
Get the center Z position of this map.
virtual Dimension * getDimension () const = 0
Get the dimension that this map is associated with.
virtual std::int64_t getId () const = 0
Get the ID of this map item for use with MapMeta .
virtual std::vector< MapRenderer * > getRenderers () const = 0
Get a list of MapRenderers currently in effect.
virtual Scale getScale () const = 0
Get the scale of this map.
virtual bool isLocked () const = 0
Gets whether the map is locked or not. A locked map may not be explored further.
virtual bool isUnlimitedTracking () const = 0
Whether the map will show a smaller position cursor (true), or no position cursor (false) when cursor is outside of map's range.
virtual bool isVirtual () const = 0
Check whether this map is virtual.
virtual bool removeRenderer (MapRenderer * renderer) = 0
Remove a renderer from this map.
virtual void setCenterX (int x) = 0
Set the center X position of this map.
virtual void setCenterZ (int z) = 0
Set the center Z position of this map.
virtual void setDimension (Dimension * dimension) = 0
Set the dimension that this map is associated with.
virtual void setLocked (bool locked) = 0
Sets whether the map is locked or not. A locked map may not be explored further.
virtual void setScale (Scale scale) = 0
Set the scale of this map.
virtual void setUnlimitedTracking (bool unlimited) = 0
Whether the map will show a smaller position cursor (true), or no position cursor (false) when cursor is outside of map's range.
virtual ~MapView () = default

Public Types Documentation

enum Scale

An enum representing all possible scales a map can be set to.

enum endstone::MapView::Scale {
    Closet = 0,
    Close = 1,
    Normal = 2,
    Far = 3,
    Farthest = 4
};


Public Functions Documentation

function addRenderer

Add a renderer to this map.

virtual void endstone::MapView::addRenderer (
    MapRenderer & renderer
) = 0

Parameters:


function getCenterX

Get the center X position of this map.

virtual int endstone::MapView::getCenterX () const = 0

Returns:

The center X position.


function getCenterZ

Get the center Z position of this map.

virtual int endstone::MapView::getCenterZ () const = 0

Returns:

The center Z position.


function getDimension

Get the dimension that this map is associated with.

virtual Dimension * endstone::MapView::getDimension () const = 0

Returns:

Pointer to the World this map is associated with, or nullptr.


function getId

Get the ID of this map item for use with MapMeta .

virtual std::int64_t endstone::MapView::getId () const = 0

Returns:

The unique ID of the map.


function getRenderers

Get a list of MapRenderers currently in effect.

virtual std::vector< MapRenderer * > endstone::MapView::getRenderers () const = 0

Returns:

A list of references to each MapRenderer.


function getScale

Get the scale of this map.

virtual Scale endstone::MapView::getScale () const = 0

Returns:

The scale of the map.


function isLocked

Gets whether the map is locked or not. A locked map may not be explored further.

virtual bool endstone::MapView::isLocked () const = 0

Returns:

True if the map is locked.


function isUnlimitedTracking

Whether the map will show a smaller position cursor (true), or no position cursor (false) when cursor is outside of map's range.

virtual bool endstone::MapView::isUnlimitedTracking () const = 0

Returns:

True if unlimited tracking is enabled.


function isVirtual

Check whether this map is virtual.

virtual bool endstone::MapView::isVirtual () const = 0

A map is virtual if its lowermost MapRenderer is plugin-provided.

Returns:

True if the map is virtual.


function removeRenderer

Remove a renderer from this map.

virtual bool endstone::MapView::removeRenderer (
    MapRenderer * renderer
) = 0

Parameters:

Returns:

True if the renderer was successfully removed.


function setCenterX

Set the center X position of this map.

virtual void endstone::MapView::setCenterX (
    int x
) = 0

Parameters:

  • x The center X position.

function setCenterZ

Set the center Z position of this map.

virtual void endstone::MapView::setCenterZ (
    int z
) = 0

Parameters:

  • z The center Z position.

function setDimension

Set the dimension that this map is associated with.

virtual void endstone::MapView::setDimension (
    Dimension * dimension
) = 0

Parameters:

  • dimension The Dimension to associate this map with.

function setLocked

Sets whether the map is locked or not. A locked map may not be explored further.

virtual void endstone::MapView::setLocked (
    bool locked
) = 0

Parameters:

  • locked True to lock the map.

function setScale

Set the scale of this map.

virtual void endstone::MapView::setScale (
    Scale scale
) = 0

Parameters:

  • scale The scale to set.

function setUnlimitedTracking

Whether the map will show a smaller position cursor (true), or no position cursor (false) when cursor is outside of map's range.

virtual void endstone::MapView::setUnlimitedTracking (
    bool unlimited
) = 0

Parameters:

  • unlimited True to enable unlimited tracking.

function ~MapView

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


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