程序包 org.bukkit.map

类 MapCursorCollection

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

public final class MapCursorCollection extends Object
表示MapCanvas上的所有地图光标。与MapCanvas类似,MapCursorCollection与特定的MapRenderer相关联。
  • 构造器详细资料

    • MapCursorCollection

      public MapCursorCollection()
  • 方法详细资料

    • size

      public int size()
      获取此集合中的光标数量。

      原文: Get the amount of cursors in this collection.

      返回:
      此集合的大小。
    • getCursor

      @NotNull public @NotNull MapCursor getCursor(int index)
      从此集合中获取一个光标。

      原文: Get a cursor from this collection.

      参数:
      index - 光标的索引。
      返回:
      该MapCursor对象。
    • removeCursor

      public boolean removeCursor(@NotNull @NotNull MapCursor cursor)
      从集合中移除一个光标。

      原文: Remove a cursor from the collection.

      参数:
      cursor - 要移除的MapCursor。
      返回:
      光标是否被成功移除。
    • addCursor

      向集合中添加一个光标。

      原文: Add a cursor to the collection.

      参数:
      cursor - 要添加的MapCursor。
      返回:
      传入的MapCursor对象。
    • addCursor

      @NotNull public @NotNull MapCursor addCursor(int x, int y, byte direction)
      向集合中添加一个光标。

      原文: Add a cursor to the collection.

      参数:
      x - x坐标,范围从-128到127。
      y - y坐标,范围从-128到127。
      direction - 光标的朝向,范围从0到15。
      返回:
      新添加的MapCursor对象。
    • addCursor

      @Deprecated(since="1.6.2") @NotNull public @NotNull MapCursor addCursor(int x, int y, byte direction, byte type)
      已过时。
      魔法值
      向集合中添加一个光标。

      原文: Add a cursor to the collection.

      参数:
      x - x坐标,范围从-128到127。
      y - y坐标,范围从-128到127。
      direction - 光标的朝向,范围从0到15。
      type - 地图光标的类型(颜色/样式)。
      返回:
      新添加的MapCursor对象。
    • addCursor

      @Deprecated(since="1.6.2") @NotNull public @NotNull MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible)
      已过时。
      魔法值
      向集合中添加一个光标。

      原文: Add a cursor to the collection.

      参数:
      x - x坐标,范围从-128到127。
      y - y坐标,范围从-128到127。
      direction - 光标的朝向,范围从0到15。
      type - 地图光标的类型(颜色/样式)。
      visible - 光标是否可见。
      返回:
      新添加的MapCursor对象。
    • addCursor

      @Deprecated(since="1.13") @NotNull public @NotNull MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible, @Nullable @Nullable String caption)
      已过时。
      魔法值
      向集合中添加一个光标。

      原文: Add a cursor to the collection.

      参数:
      x - x坐标,范围从-128到127。
      y - y坐标,范围从-128到127。
      direction - 光标的朝向,范围从0到15。
      type - 地图光标的类型(颜色/样式)。
      visible - 光标是否可见。
      caption - 横幅标题
      返回:
      新添加的MapCursor对象。