程序包 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

      public MapCursorCollection()
  • 方法详细资料

    • size

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

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

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

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

      public 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 public 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 public 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.