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. |
| Result< 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) |
| 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:
xThe x coordinate, from -128 to 127.yThe y coordinate, from -128 to 127.directionThe facing of the cursor, from 0 to 15.typeThe type (color/style) of the map cursor.visibleWhether the cursor is visible by default.captioncursor caption
function getCaption¶
Gets the caption on this cursor.
Returns:
caption
function getDirection¶
Get the direction of this cursor.
Returns:
The facing of the cursor, from 0 to 15.
function getType¶
Get the type of this cursor.
Returns:
The type (color/style) of the map cursor.
function getX¶
Get the X position of this cursor.
Returns:
The X coordinate.
function getY¶
Get the Y position of this cursor.
Returns:
The Y coordinate.
function isVisible¶
Get the visibility status of this cursor.
Returns:
True if visible, false otherwise.
function setCaption¶
Sets the caption on this cursor.
Parameters:
captionnew caption
function setDirection¶
Set the direction of this cursor.
Parameters:
directionThe facing of the cursor, from 0 to 15.
function setType¶
Set the type of this cursor.
Parameters:
typeThe type (color/style) of the map cursor.
function setVisible¶
Set the visibility status of this cursor.
Parameters:
visibleTrue if visible.
function setX¶
Set the X position of this cursor.
Parameters:
xThe X coordinate.
function setY¶
Set the Y position of this cursor.
Parameters:
yThe Y coordinate.
The documentation for this class was generated from the following file include/endstone/map/map_cursor.h