程序包 org.bukkit
枚举 Instrument
- 所有已实现的接口:
Serializable
,Comparable<Instrument>
,java.lang.constant.Constable
-
嵌套类概要
从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
枚举常量概要
枚举常量说明当音符盒在一个石类方块的顶部时通常会以低音鼓的形式演奏。当音符盒在一个木类方块的顶部时通常会以低音吉他的形式演奏。Bell is normally played when a note block is on top of a gold block.Chime is normally played when a note block is on top of a packed ice 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.钢琴是音符盒的标准乐器。当音符盒在一个沙类方块的顶部时通常会以小军鼓的形式演奏。当音符盒在一个玻璃方块的顶部时通常会以鼓槌的形式演奏。Xylophone is normally played when a note block is on top of a bone block. -
方法概要
修饰符和类型方法说明static Instrument
getByType
(byte type) 已过时。不安全的参数byte
getType()
已过时。不安全的参数static Instrument
返回带有指定名称的该类型的枚举常量。static Instrument[]
values()
按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。
-
枚举常量详细资料
-
PIANO
钢琴是音符盒的标准乐器。 -
BASS_DRUM
当音符盒在一个石类方块的顶部时通常会以低音鼓的形式演奏。 -
SNARE_DRUM
当音符盒在一个沙类方块的顶部时通常会以小军鼓的形式演奏。 -
STICKS
当音符盒在一个玻璃方块的顶部时通常会以鼓槌的形式演奏。 -
BASS_GUITAR
当音符盒在一个木类方块的顶部时通常会以低音吉他的形式演奏。 -
FLUTE
Flute is normally played when a note block is on top of a clay block. -
BELL
Bell is normally played when a note block is on top of a gold block. -
GUITAR
Guitar is normally played when a note block is on top of a woolen block. -
CHIME
Chime is normally played when a note block is on top of a packed ice block. -
XYLOPHONE
Xylophone is normally played when a note block is on top of a bone block.
-
-
方法详细资料
-
values
按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。- 返回:
- 按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
-
valueOf
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name
- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量NullPointerException
- 如果参数为空值
-
getType
已过时。不安全的参数- 返回:
- 乐器的类型ID
-
getByType
已过时。不安全的参数根据类型ID获取Instrument对象。原文: Get an instrument by its type ID.
- 参数:
type
- 类型ID- 返回:
- 相应的Instrument对象
-