程序包 org.bukkit
枚举 Instrument
- 所有已实现的接口:
Serializable
,Comparable<Instrument>
,Constable
-
嵌套类概要
从类继承的嵌套类/接口 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. -
方法概要
修饰符和类型方法说明static @Nullable Instrument
getByType
(byte type) 已过时。不安全的参数getSound()
Gets the sound associated with this instrument.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. -
IRON_XYLOPHONE
Iron Xylophone is normally played when a note block is on top of a iron block. -
COW_BELL
Cow Bell is normally played when a note block is on top of a soul sand block. -
DIDGERIDOO
Didgeridoo is normally played when a note block is on top of a pumpkin block. -
BIT
Bit is normally played when a note block is on top of a emerald block. -
BANJO
Banjo is normally played when a note block is on top of a hay block. -
PLING
Pling is normally played when a note block is on top of a glowstone block. -
ZOMBIE
Zombie is normally played when a Zombie Head is on top of the note block. -
SKELETON
Skeleton is normally played when a Skeleton Head is on top of the note block. -
CREEPER
Creeper is normally played when a Creeper Head is on top of the note block. -
DRAGON
Dragon is normally played when a Dragon Head is on top of the note block. -
WITHER_SKELETON
Wither Skeleton is normally played when a Wither Skeleton Head is on top of the note block. -
PIGLIN
Piglin is normally played when a Piglin Head is on top of the note block. -
CUSTOM_HEAD
Custom Sound is normally played when a Player Head with the required data is on top of the note block.
-
-
方法详细资料
-
values
按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。- 返回:
- 按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
-
valueOf
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name
- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量NullPointerException
- 如果参数为空值
-
getSound
Gets the sound associated with this instrument.
Will be null forCUSTOM_HEAD
- 返回:
- the sound or null
-
getType
已过时。不安全的参数- 返回:
- 乐器的类型ID
-
getByType
已过时。不安全的参数根据类型ID获取Instrument对象。原文: Get an instrument by its type ID.
- 参数:
type
- 类型ID- 返回:
- 相应的Instrument对象
-