public final class MapCursorCollection extends Object
MapCanvas
. Like MapCanvas, a
MapCursorCollection is linked to a specific MapRenderer
.Constructor and Description |
---|
MapCursorCollection() |
Modifier and Type | Method and Description |
---|---|
@NotNull MapCursor |
addCursor(int x,
int y,
byte direction)
Add a cursor to the collection.
|
@NotNull MapCursor |
addCursor(int x,
int y,
byte direction,
byte type)
Deprecated.
Magic value
|
@NotNull MapCursor |
addCursor(int x,
int y,
byte direction,
byte type,
boolean visible)
Deprecated.
Magic value
|
@NotNull MapCursor |
addCursor(int x,
int y,
byte direction,
byte type,
boolean visible,
net.kyori.adventure.text.Component caption)
Deprecated.
Magic value
|
@NotNull MapCursor |
addCursor(int x,
int y,
byte direction,
byte type,
boolean visible,
@Nullable String caption)
Deprecated.
Magic value
|
@NotNull MapCursor |
addCursor(@NotNull MapCursor cursor)
Add a cursor to the collection.
|
@NotNull MapCursor |
getCursor(int index)
Get a cursor from this collection.
|
boolean |
removeCursor(@NotNull MapCursor cursor)
Remove a cursor from the collection.
|
int |
size()
Get the amount of cursors in this collection.
|
public int size()
@NotNull public @NotNull MapCursor getCursor(int index)
index
- The index of the cursor.public boolean removeCursor(@NotNull @NotNull MapCursor cursor)
cursor
- The MapCursor to remove.@NotNull public @NotNull MapCursor addCursor(@NotNull @NotNull MapCursor cursor)
cursor
- The MapCursor to add.@NotNull public @NotNull MapCursor addCursor(int x, int y, byte direction)
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.@Deprecated @NotNull public @NotNull MapCursor addCursor(int x, int y, byte direction, byte type)
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.@Deprecated @NotNull public @NotNull MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible)
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.@Deprecated @NotNull public @NotNull MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible, @Nullable @Nullable String caption)
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.caption
- banner caption@Deprecated @NotNull public @NotNull MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible, @Nullable net.kyori.adventure.text.Component caption)
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.caption
- banner captionCopyright © 2021. All rights reserved.