程序包 org.bukkit

枚举 Instrument

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

public enum Instrument extends Enum<Instrument>
  • 嵌套类概要

    从类继承的嵌套类/接口 java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • 枚举常量概要

    枚举常量
    枚举常量
    说明
    Banjo is normally played when a note block is on top of a hay block.
    当音符盒在一个石类方块的顶部时通常会以低音鼓的形式演奏。
    当音符盒在一个木类方块的顶部时通常会以低音吉他的形式演奏。
    Bell is normally played when a note block is on top of a gold block.
    Bit is normally played when a note block is on top of a emerald block.
    Chime is normally played when a note block is on top of a packed ice block.
    Cow Bell is normally played when a note block is on top of a soul sand block.
    Creeper is normally played when a Creeper Head is on top of the note block.
    Custom Sound is normally played when a Player Head with the required data is on top of the note block.
    Didgeridoo is normally played when a note block is on top of a pumpkin block.
    Dragon is normally played when a Dragon Head is on top of the note block.
    Flute is normally played when a note block is on top of a clay block.
    Guitar is normally played when a note block is on top of a woolen block.
    Iron Xylophone is normally played when a note block is on top of a iron block.
    钢琴是音符盒的标准乐器。
    Piglin is normally played when a Piglin Head is on top of the note block.
    Pling is normally played when a note block is on top of a glowstone block.
    Skeleton is normally played when a Skeleton Head is on top of the note block.
    当音符盒在一个沙类方块的顶部时通常会以小军鼓的形式演奏。
    当音符盒在一个玻璃方块的顶部时通常会以鼓槌的形式演奏。
    Wither Skeleton is normally played when a Wither Skeleton Head is on top of the note block.
    Xylophone is normally played when a note block is on top of a bone block.
    Zombie is normally played when a Zombie Head is on top of the note block.
  • 方法概要

    修饰符和类型
    方法
    说明
    getByType(byte type)
    已过时。
    不安全的参数
    byte
    已过时。
    不安全的参数
    static Instrument
    返回带有指定名称的该类型的枚举常量。
    static Instrument[]
    按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。

    从类继承的方法 java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • 枚举常量详细资料

    • PIANO

      public static final Instrument PIANO
      钢琴是音符盒的标准乐器。
    • BASS_DRUM

      public static final Instrument BASS_DRUM
      当音符盒在一个石类方块的顶部时通常会以低音鼓的形式演奏。
    • SNARE_DRUM

      public static final Instrument SNARE_DRUM
      当音符盒在一个沙类方块的顶部时通常会以小军鼓的形式演奏。
    • STICKS

      public static final Instrument STICKS
      当音符盒在一个玻璃方块的顶部时通常会以鼓槌的形式演奏。
    • BASS_GUITAR

      public static final Instrument BASS_GUITAR
      当音符盒在一个木类方块的顶部时通常会以低音吉他的形式演奏。
    • FLUTE

      public static final Instrument FLUTE
      Flute is normally played when a note block is on top of a clay block.
    • BELL

      public static final Instrument BELL
      Bell is normally played when a note block is on top of a gold block.
    • GUITAR

      public static final Instrument GUITAR
      Guitar is normally played when a note block is on top of a woolen block.
    • CHIME

      public static final Instrument CHIME
      Chime is normally played when a note block is on top of a packed ice block.
    • XYLOPHONE

      public static final Instrument XYLOPHONE
      Xylophone is normally played when a note block is on top of a bone block.
    • IRON_XYLOPHONE

      public static final Instrument IRON_XYLOPHONE
      Iron Xylophone is normally played when a note block is on top of a iron block.
    • COW_BELL

      public static final Instrument COW_BELL
      Cow Bell is normally played when a note block is on top of a soul sand block.
    • DIDGERIDOO

      public static final Instrument DIDGERIDOO
      Didgeridoo is normally played when a note block is on top of a pumpkin block.
    • BIT

      public static final Instrument BIT
      Bit is normally played when a note block is on top of a emerald block.
    • BANJO

      public static final Instrument BANJO
      Banjo is normally played when a note block is on top of a hay block.
    • PLING

      public static final Instrument PLING
      Pling is normally played when a note block is on top of a glowstone block.
    • ZOMBIE

      public static final Instrument ZOMBIE
      Zombie is normally played when a Zombie Head is on top of the note block.
    • SKELETON

      public static final Instrument SKELETON
      Skeleton is normally played when a Skeleton Head is on top of the note block.
    • CREEPER

      public static final Instrument CREEPER
      Creeper is normally played when a Creeper Head is on top of the note block.
    • DRAGON

      public static final Instrument DRAGON
      Dragon is normally played when a Dragon Head is on top of the note block.
    • WITHER_SKELETON

      public static final Instrument WITHER_SKELETON
      Wither Skeleton is normally played when a Wither Skeleton Head is on top of the note block.
    • PIGLIN

      public static final Instrument PIGLIN
      Piglin is normally played when a Piglin Head is on top of the note block.
    • CUSTOM_HEAD

      public static final Instrument CUSTOM_HEAD
      Custom Sound is normally played when a Player Head with the required data is on top of the note block.
  • 方法详细资料

    • values

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

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

      @Deprecated public byte getType()
      已过时。
      不安全的参数
      返回:
      乐器的类型ID
    • getByType

      @Deprecated @Nullable public static @Nullable Instrument getByType(byte type)
      已过时。
      不安全的参数
      根据类型ID获取Instrument对象。

      原文: Get an instrument by its type ID.

      参数:
      type - 类型ID
      返回:
      相应的Instrument对象