程序包 org.bukkit

枚举 Note.Tone

所有已实现的接口:
Serializable, Comparable<Note.Tone>, java.lang.constant.Constable
封闭类:
Note

public static enum Note.Tone extends Enum<Note.Tone>
一个包含音调的枚举。
  • 枚举常量详细资料

  • 字段详细资料

    • TONES_COUNT

      public static final byte TONES_COUNT
      音调的数量。 原文:The number of tones including sharped tones.
      另请参阅:
  • 方法详细资料

    • values

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

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

      @Deprecated public byte getId()
      已过时。
      不安全的参数
      返回这个音调未升高的ID。

      原文: Returns the not sharped id of this tone.

      返回:
      这个音调未升高的ID
    • getId

      @Deprecated public byte getId(boolean sharped)
      已过时。
      不安全的参数
      返回音调ID。这些方法能够返回这个音调升高的ID。如果音调不能升高则会返回这个音调未升高的ID。

      原文: Returns the id of this tone. These method allows to return the sharped id of the tone. If the tone couldn't be sharped it always return the not sharped id of this tone.

      参数:
      sharped - 设为true则返回升高的ID
      返回:
      这个音调的ID
    • isSharpable

      public boolean isSharpable()
      返回音调是否能被升高。

      原文: Returns if this tone could be sharped.

      返回:
      音调是否能被升高
    • isSharped

      @Deprecated public boolean isSharped(byte id)
      已过时。
      不安全的参数
      返回这个音调的ID是否为升高音调的ID。

      原文: Returns if this tone id is the sharped id of the tone.

      参数:
      id - 音调ID
      返回:
      这个音调的ID是否为升高音调的ID
      抛出:
      IllegalArgumentException - 如果音调和半音都没有ID则抛出错误
    • getById

      @Deprecated @Nullable public static @Nullable Note.Tone getById(byte id)
      已过时。
      不安全的参数
      返回音调对应的ID,同时返回半音。

      原文: Returns the tone to id. Also returning the semitones.

      参数:
      id - 音调的ID
      返回:
      音调对应的ID