程序包 org.bukkit.map

类 MapCursor

java.lang.Object
org.bukkit.map.MapCursor

public final class MapCursor extends Object
表示一个地图上的光标.

原文: Represents a cursor on a map.

  • 构造器详细资料

    • MapCursor

      @Deprecated public MapCursor(byte x, byte y, byte direction, byte type, boolean visible)
      已过时。
      不安全的参数
      初始化地图光标.

      原文:Initialize the map cursor.

      参数:
      x - x坐标,范围为-128到127
      y - y坐标,范围为-128到127
      direction - 光标的朝向,范围为0到15
      type - 地图光标的类型(颜色、风格)
      visible - 光标在默认情况下是否可见
    • MapCursor

      public MapCursor(byte x, byte y, byte direction, @NotNull @NotNull MapCursor.Type type, boolean visible)
      初始化地图光标.

      原文:Initialize the map cursor.

      参数:
      x - x坐标,范围为-128到127
      y - y坐标,范围为-128到127
      direction - 光标的朝向,范围为0到15
      type - 地图光标的类型(颜色、风格)
      visible - 光标在默认情况下是否可见
    • MapCursor

      @Deprecated public MapCursor(byte x, byte y, byte direction, byte type, boolean visible, @Nullable @Nullable String caption)
      已过时。
      不安全的参数
      初始化地图光标.

      原文:Initialize the map cursor.

      参数:
      x - x坐标,范围为-128到127
      y - y坐标,范围为-128到127
      direction - 光标的朝向,范围为0到15
      type - 地图光标的类型(颜色、风格)
      visible - 光标在默认情况下是否可见
      caption - 光标标题
    • MapCursor

      public MapCursor(byte x, byte y, byte direction, @NotNull @NotNull MapCursor.Type type, boolean visible, @Nullable @Nullable String caption)
      初始化地图光标.

      原文:Initialize the map cursor.

      参数:
      x - x坐标,范围为-128到127
      y - y坐标,范围为-128到127
      direction - 光标的朝向,范围为0到15
      type - 地图光标的类型(颜色、风格)
      visible - 光标在默认情况下是否可见
      caption - 光标标题
  • 方法详细资料

    • getX

      public byte getX()
      获取这个光标的X坐标.

      原文: Get the X position of this cursor.

      返回:
      X坐标
    • getY

      public byte getY()
      获取这个光标的Y坐标.

      原文: Get the Y position of this cursor.

      返回:
      Y坐标
    • getDirection

      public byte getDirection()
      获取这个光标的朝向.

      原文: Get the direction of this cursor.

      返回:
      光标的朝向,范围为0到15
    • getType

      @NotNull public @NotNull MapCursor.Type getType()
      获取这个光标的类型.

      原文: Get the type of this cursor.

      返回:
      地图光标的类型(颜色、风格)
    • getRawType

      @Deprecated public byte getRawType()
      已过时。
      不安全的参数
      获取这个光标的类型.

      原文: Get the type of this cursor.

      返回:
      地图光标的类型(颜色、风格)
    • isVisible

      public boolean isVisible()
      获取这个光标的可见情况.

      原文: Get the visibility status of this cursor.

      返回:
      可见则返回true,否则返回false
    • setX

      public void setX(byte x)
      设置这个光标的X坐标.

      原文: Set the X position of this cursor.

      参数:
      x - X坐标
    • setY

      public void setY(byte y)
      设置这个光标的Y坐标.

      原文: Set the Y position of this cursor.

      参数:
      y - Y坐标
    • setDirection

      public void setDirection(byte direction)
      设置这个光标的方向.

      原文: Set the direction of this cursor.

      参数:
      direction - 这个光标的朝向,范围为0到15
    • setType

      public void setType(@NotNull @NotNull MapCursor.Type type)
      设置这个光标的类型.

      原文: Set the type of this cursor.

      参数:
      type - 地图光标的类型(颜色、风格)
    • setRawType

      @Deprecated public void setRawType(byte type)
      已过时。
      不安全的参数
      设置这个光标的类型.

      原文: Set the type of this cursor.

      参数:
      type - 地图光标的类型(颜色、风格)
    • setVisible

      public void setVisible(boolean visible)
      设置这个光标的可见情况.

      原文: Set the visibility status of this cursor.

      参数:
      visible - 可见则为true
    • getCaption

      @Nullable public @Nullable String getCaption()
      Gets the caption on this cursor.
      返回:
      caption
    • setCaption

      public void setCaption(@Nullable @Nullable String caption)
      Sets the caption on this cursor.
      参数:
      caption - new caption