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.
Public Functions Documentation¶
function addRenderer¶
Add a renderer to this map.
Parameters:
renderer
The MapRenderer to add.
function getCenterX¶
Get the center X position of this map.
Returns:
The center X position.
function getCenterZ¶
Get the center Z position of this map.
Returns:
The center Z position.
function getDimension¶
Get the dimension that this map is associated with.
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 .
Returns:
The unique ID of the map.
function getRenderers¶
Get a list of MapRenderers currently in effect.
Returns:
A list of references to each MapRenderer.
function getScale¶
Get the scale of this map.
Returns:
The scale of the map.
function isLocked¶
Gets whether the map is locked or not. A locked map may not be explored further.
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.
Returns:
True if unlimited tracking is enabled.
function isVirtual¶
Check whether this map is virtual.
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.
Parameters:
renderer
The MapRenderer to remove.
Returns:
True if the renderer was successfully removed.
function setCenterX¶
Set the center X position of this map.
Parameters:
x
The center X position.
function setCenterZ¶
Set the center Z position of this map.
Parameters:
z
The center Z position.
function setDimension¶
Set the dimension that this map is associated with.
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.
Parameters:
locked
True to lock the map.
function setScale¶
Set the scale of this map.
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.
Parameters:
unlimited
True to enable unlimited tracking.
function ~MapView¶
The documentation for this class was generated from the following file include/endstone/map/map_view.h