程序包 org.bukkit

枚举 Rotation

所有已实现的接口:
Serializable, Comparable<Rotation>, java.lang.constant.Constable

public enum Rotation extends Enum<Rotation>
指定旋转方向的枚举。
  • 枚举常量详细资料

    • NONE

      public static final Rotation NONE
      无旋转。
    • CLOCKWISE_45

      public static final Rotation CLOCKWISE_45
      按顺时针方向旋转45度。
    • CLOCKWISE

      public static final Rotation CLOCKWISE
      按顺时针方向旋转90度。
    • CLOCKWISE_135

      public static final Rotation CLOCKWISE_135
      按顺时针方向旋转135度。
    • FLIPPED

      public static final Rotation FLIPPED
      倒置翻转180度。
    • FLIPPED_45

      public static final Rotation FLIPPED_45
      倒置翻转180+45度。
    • COUNTER_CLOCKWISE

      public static final Rotation COUNTER_CLOCKWISE
      按逆时针方向旋转90度。
    • COUNTER_CLOCKWISE_45

      public static final Rotation COUNTER_CLOCKWISE_45
      按逆时针方向旋转45度。
  • 方法详细资料

    • values

      public static Rotation[] values()
      按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。
      返回:
      按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
    • valueOf

      public static Rotation valueOf(String name)
      返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量
      NullPointerException - 如果参数为空值
    • rotateClockwise

      @NotNull public @NotNull Rotation rotateClockwise()
      按顺时针方向旋转90度。

      原文:Rotate clockwise by 90 degrees.

      返回:
      旋转
    • rotateCounterClockwise

      @NotNull public @NotNull Rotation rotateCounterClockwise()
      按逆时针方向旋转90度。

      原文:Rotate counter-clockwise by 90 degrees.

      返回:
      旋转