Package org.bukkit.map
Class MapCursor
java.lang.Object
org.bukkit.map.MapCursor
Represents a cursor on a map.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumRepresents the standard types of map cursors.
- 
Constructor SummaryConstructorsConstructorDescriptionMapCursor(byte x, byte y, byte direction, byte type, boolean visible) Deprecated.Magic valueDeprecated.Magic value.Deprecated.Magic valueMapCursor(byte x, byte y, byte direction, @NotNull MapCursor.Type type, boolean visible) Initialize the map cursor.MapCursor(byte x, byte y, byte direction, @NotNull MapCursor.Type type, boolean visible, @Nullable String caption) Initialize the map cursor.MapCursor(byte x, byte y, byte direction, @NotNull MapCursor.Type type, boolean visible, @Nullable Component caption) Initialize the map cursor.
- 
Method SummaryModifier and TypeMethodDescriptioncaption()Gets the caption on this cursor.voidSets the caption on this cursor.Deprecated.in favour ofcaption()byteGet the direction of this cursor.byteGet the type of this cursor.getType()Get the type of this cursor.bytegetX()Get the X position of this cursor.bytegetY()Get the Y position of this cursor.booleanGet the visibility status of this cursor.voidsetCaption(@Nullable String caption) Deprecated.in favour ofcaption(net.kyori.adventure.text.Component)voidsetDirection(byte direction) Set the direction of this cursor.voidsetRawType(byte type) Deprecated, for removal: This API element is subject to removal in a future version.usesetType(Type)voidsetType(@NotNull MapCursor.Type type) Set the type of this cursor.voidsetVisible(boolean visible) Set the visibility status of this cursor.voidsetX(byte x) Set the X position of this cursor.voidsetY(byte y) Set the Y position of this cursor.
- 
Constructor Details- 
MapCursorDeprecated.Magic valueInitialize the map cursor.- 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.
 
- 
MapCursorpublic MapCursor(byte x, byte y, byte direction, @NotNull @NotNull MapCursor.Type type, boolean visible) Initialize the map cursor.- 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.
 
- 
MapCursor@Deprecated public MapCursor(byte x, byte y, byte direction, byte type, boolean visible, @Nullable @Nullable String caption) Deprecated.Initialize the map cursor.- 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
 
- 
MapCursor@Deprecated public MapCursor(byte x, byte y, byte direction, byte type, boolean visible, @Nullable Component caption) Deprecated.Magic valueInitialize the map cursor.- 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
 
- 
MapCursorpublic MapCursor(byte x, byte y, byte direction, @NotNull @NotNull MapCursor.Type type, boolean visible, @Nullable Component caption) Initialize the map cursor.- 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
 
- 
MapCursorpublic MapCursor(byte x, byte y, byte direction, @NotNull @NotNull MapCursor.Type type, boolean visible, @Nullable @Nullable String caption) Initialize the map cursor.- 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
 
 
- 
- 
Method Details- 
getXpublic byte getX()Get the X position of this cursor.- Returns:
- The X coordinate.
 
- 
getYpublic byte getY()Get the Y position of this cursor.- Returns:
- The Y coordinate.
 
- 
getDirectionpublic byte getDirection()Get the direction of this cursor.- Returns:
- The facing of the cursor, from 0 to 15.
 
- 
getTypeGet the type of this cursor.- Returns:
- The type (color/style) of the map cursor.
 
- 
getRawTypeGet the type of this cursor.- Returns:
- The type (color/style) of the map cursor.
- API Note:
- Internal Use Only
 
- 
isVisiblepublic boolean isVisible()Get the visibility status of this cursor.- Returns:
- True if visible, false otherwise.
 
- 
setXpublic void setX(byte x) Set the X position of this cursor.- Parameters:
- x- The X coordinate.
 
- 
setYpublic void setY(byte y) Set the Y position of this cursor.- Parameters:
- y- The Y coordinate.
 
- 
setDirectionpublic void setDirection(byte direction) Set the direction of this cursor.- Parameters:
- direction- The facing of the cursor, from 0 to 15.
 
- 
setTypeSet the type of this cursor.- Parameters:
- type- The type (color/style) of the map cursor.
 
- 
setRawTypeDeprecated, for removal: This API element is subject to removal in a future version.usesetType(Type)Set the type of this cursor.- Parameters:
- type- The type (color/style) of the map cursor.
 
- 
setVisiblepublic void setVisible(boolean visible) Set the visibility status of this cursor.- Parameters:
- visible- True if visible.
 
- 
captionGets the caption on this cursor.- Returns:
- caption
 
- 
captionSets the caption on this cursor.- Parameters:
- caption- new caption
 
- 
getCaptionDeprecated.in favour ofcaption()Gets the caption on this cursor.- Returns:
- caption
 
- 
setCaptionDeprecated.in favour ofcaption(net.kyori.adventure.text.Component)Sets the caption on this cursor.- Parameters:
- caption- new caption
 
 
-