程序包 org.bukkit.map

# 类 MapCursorCollection

java.lang.Object
org.bukkit.map.MapCursorCollection

public final class MapCursorCollection extends Object
Represents all the map cursors on a `MapCanvas`. Like MapCanvas, a MapCursorCollection is linked to a specific `MapRenderer`.

- ## 构造器概要

  构造器
  构造器
  说明
  `MapCursorCollection()`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@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)`
  已过时。
  Magic value
  `@NotNull MapCursor`
  `addCursor(int x, int y, byte direction, byte type, boolean visible)`
  已过时。
  Magic value
  `@NotNull MapCursor`
  `addCursor(int x, int y, byte direction, byte type, boolean visible, @Nullable String caption)`
  已过时。
  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.

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 构造器详细资料

  - ### MapCursorCollection

    public MapCursorCollection()

- ## 方法详细资料

  - ### size

    public int size()
    Get the amount of cursors in this collection.
    返回:
      The size of this collection.

  - ### getCursor

    @NotNull public @NotNull MapCursor getCursor(int index)
    Get a cursor from this collection.
    参数:
      `index` - The index of the cursor.
    返回:
      The MapCursor.

  - ### removeCursor

    public boolean removeCursor(@NotNull @NotNull MapCursor cursor)
    Remove a cursor from the collection.
    参数:
      `cursor` - The MapCursor to remove.
    返回:
      Whether the cursor was removed successfully.

  - ### addCursor

    @NotNull public @NotNull MapCursor addCursor(@NotNull @NotNull MapCursor cursor)
    Add a cursor to the collection.
    参数:
      `cursor` - The MapCursor to add.
    返回:
      The MapCursor that was passed.

  - ### addCursor

    @NotNull public @NotNull MapCursor addCursor(int x, int y, byte direction)
    Add a cursor to the collection.
    参数:
      `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.
    返回:
      The newly added MapCursor.

  - ### addCursor

    @Deprecated @NotNull public @NotNull MapCursor addCursor(int x, int y, byte direction, byte type)
    已过时。
    Magic value
    Add a cursor to the collection.
    参数:
      `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.
    返回:
      The newly added MapCursor.

  - ### addCursor

    @Deprecated @NotNull public @NotNull MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible)
    已过时。
    Magic value
    Add a cursor to the collection.
    参数:
      `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.
    返回:
      The newly added MapCursor.

  - ### addCursor

    @Deprecated @NotNull public @NotNull MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible, @Nullable @Nullable String caption)
    已过时。
    Magic value
    Add a cursor to the collection.
    参数:
      `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
    返回:
      The newly added MapCursor.