程序包 org.bukkit
类 MusicInstrument
java.lang.Object
org.bukkit.MusicInstrument
- 所有已实现的接口:
Keyed
,RegistryAware
-
字段概要
字段修饰符和类型字段说明static final MusicInstrument
static final MusicInstrument
static final MusicInstrument
static final MusicInstrument
static final MusicInstrument
static final MusicInstrument
static final MusicInstrument
static final MusicInstrument
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static @Nullable MusicInstrument
getByKey
(@NotNull NamespacedKey namespacedKey) 已过时。Gets the description of this instrument.abstract float
Gets how long the use duration is for the instrument.abstract @NotNull NamespacedKey
getKey()
已过时。A key might not always be present, useRegistryAware.getKeyOrThrow()
instead.abstract float
getRange()
Gets the range of the sound.Gets the sound/sound-event for this instrument.static @NotNull Collection<MusicInstrument>
values()
已过时。useIterable.iterator()
.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 org.bukkit.registry.RegistryAware
getKeyOrNull, getKeyOrThrow, isRegistered
-
字段详细资料
-
PONDER_GOAT_HORN
-
SING_GOAT_HORN
-
SEEK_GOAT_HORN
-
FEEL_GOAT_HORN
-
ADMIRE_GOAT_HORN
-
CALL_GOAT_HORN
-
YEARN_GOAT_HORN
-
DREAM_GOAT_HORN
-
-
构造器详细资料
-
MusicInstrument
public MusicInstrument()
-
-
方法详细资料
-
getDuration
public abstract float getDuration()Gets how long the use duration is for the instrument.- 返回:
- the duration.
-
getRange
public abstract float getRange()Gets the range of the sound.- 返回:
- the range of the sound.
-
getDescription
Gets the description of this instrument.- 返回:
- the description.
-
getSoundEvent
Gets the sound/sound-event for this instrument.- 返回:
- a sound.
-
getKey
已过时。A key might not always be present, useRegistryAware.getKeyOrThrow()
instead.返回用于此对象的命名空间标识符.原文:Return the namespaced identifier for this object.
-
getByKey
@Nullable @Deprecated(since="1.20.1") public static @Nullable MusicInstrument getByKey(@NotNull @NotNull NamespacedKey namespacedKey) 已过时。UseRegistry.get(NamespacedKey)
instead.Returns aMusicInstrument
by aNamespacedKey
.- 参数:
namespacedKey
- the key- 返回:
- the event or null
-
values
已过时。useIterable.iterator()
.Returns all known MusicInstruments.- 返回:
- the memoryKeys
-
Registry.get(NamespacedKey)
instead.