Skip to content

Class endstone::MapCursor

ClassList > endstone > MapCursor

Represents a cursor on a map.

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

Public Types

Type Name
enum Type
Represents the standard types of map cursors.

Public Functions

Type Name
MapCursor (std::int8_t x, std::int8_t y, std::int8_t direction, Type type, bool visible, std::string caption="")
Initialize the map cursor.
std::string getCaption () const
Gets the caption on this cursor.
std::int8_t getDirection () const
Get the direction of this cursor.
Type getType () const
Get the type of this cursor.
std::int8_t getX () const
Get the X position of this cursor.
std::int8_t getY () const
Get the Y position of this cursor.
bool isVisible () const
Get the visibility status of this cursor.
void setCaption (std::string caption)
Sets the caption on this cursor.
void setDirection (std::int8_t direction)
Set the direction of this cursor.
void setType (Type type)
Set the type of this cursor.
void setVisible (bool visible)
Set the visibility status of this cursor.
void setX (const std::int8_t x)
Set the X position of this cursor.
void setY (const std::int8_t y)
Set the Y position of this cursor.

Public Types Documentation

enum Type

Represents the standard types of map cursors.

enum endstone::MapCursor::Type {
    Player = 0,
    Frame = 1,
    RedMarker = 2,
    BlueMarker = 3,
    TargetX = 4,
    TargetPoint = 5,
    PlayerOffMap = 6,
    SignMarker = 7,
    PinkMarker = 8,
    OrangeMarker = 9,
    YellowMarker = 10,
    CyanMarker = 11,
    GreenPoint = 12,
    PlayerOffLimits = 13,
    Mansion = 14,
    Monument = 15,
    VillageDesert = 17,
    VillagePlains = 18,
    VillageSavanna = 19,
    VillageSnowy = 20,
    VillageTaiga = 21,
    JungleTemple = 22,
    SwampHut = 23,
    TrialChambers = 24
};


Public Functions Documentation

function MapCursor

Initialize the map cursor.

inline endstone::MapCursor::MapCursor (
    std::int8_t x,
    std::int8_t y,
    std::int8_t direction,
    Type type,
    bool visible,
    std::string caption=""
) 

Parameters:

  • x The x coordinate, from -128 to 127.
  • y The y coordinate, from -128 to 127.
  • direction The facing of the cursor, from 0 to 15.
  • type The type (color/style) of the map cursor.
  • visible Whether the cursor is visible by default.
  • caption cursor caption

function getCaption

Gets the caption on this cursor.

inline std::string endstone::MapCursor::getCaption () const

Returns:

caption


function getDirection

Get the direction of this cursor.

inline std::int8_t endstone::MapCursor::getDirection () const

Returns:

The facing of the cursor, from 0 to 15.


function getType

Get the type of this cursor.

inline Type endstone::MapCursor::getType () const

Returns:

The type (color/style) of the map cursor.


function getX

Get the X position of this cursor.

inline std::int8_t endstone::MapCursor::getX () const

Returns:

The X coordinate.


function getY

Get the Y position of this cursor.

inline std::int8_t endstone::MapCursor::getY () const

Returns:

The Y coordinate.


function isVisible

Get the visibility status of this cursor.

inline bool endstone::MapCursor::isVisible () const

Returns:

True if visible, false otherwise.


function setCaption

Sets the caption on this cursor.

inline void endstone::MapCursor::setCaption (
    std::string caption
) 

Parameters:

  • caption new caption

function setDirection

Set the direction of this cursor.

inline void endstone::MapCursor::setDirection (
    std::int8_t direction
) 

Parameters:

  • direction The facing of the cursor, from 0 to 15.

function setType

Set the type of this cursor.

inline void endstone::MapCursor::setType (
    Type type
) 

Parameters:

  • type The type (color/style) of the map cursor.

function setVisible

Set the visibility status of this cursor.

inline void endstone::MapCursor::setVisible (
    bool visible
) 

Parameters:

  • visible True if visible.

function setX

Set the X position of this cursor.

inline void endstone::MapCursor::setX (
    const std::int8_t x
) 

Parameters:

  • x The X coordinate.

function setY

Set the Y position of this cursor.

inline void endstone::MapCursor::setY (
    const std::int8_t y
) 

Parameters:

  • y The Y coordinate.


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