程序包 org.bukkit
类 MusicInstrument
java.lang.Object
org.bukkit.MusicInstrument
- 所有已实现的接口:
Keyed,RegistryAware
-
字段概要
字段修饰符和类型字段说明static final MusicInstrumentstatic final MusicInstrumentstatic final MusicInstrumentstatic final MusicInstrumentstatic final MusicInstrumentstatic final MusicInstrumentstatic final MusicInstrumentstatic final MusicInstrument -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static @Nullable MusicInstrumentgetByKey(@NotNull NamespacedKey namespacedKey) 已过时。获取此乐器的描述。abstract float获取乐器的使用持续时间。abstract @NotNull NamespacedKeygetKey()已过时。键可能并不总是存在,请改用RegistryAware.getKeyOrThrow()。abstract floatgetRange()获取声音的范围。获取此乐器的声音/声音事件。static @NotNull Collection<MusicInstrument>values()已过时。请使用Iterable.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.
-
getRange
public abstract float getRange()获取声音的范围。- 返回:
- 声音的范围。 原文: Gets the range of the sound.
-
getDescription
获取此乐器的描述。- 返回:
- 描述。 原文: Gets the description of this instrument.
-
getSoundEvent
获取此乐器的声音/声音事件。- 返回:
- 声音。 原文: Gets the sound/sound-event for this instrument.
-
getKey
已过时。键可能并不总是存在,请改用RegistryAware.getKeyOrThrow()。 原文: 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) 已过时。通过NamespacedKey返回一个MusicInstrument。- 参数:
namespacedKey- 键。namespacedKey- the key- 返回:
- 事件或 null。
-
values
已过时。请使用Iterable.iterator()。 原文: Returns all known MusicInstruments.返回所有已知的 MusicInstrument。- 返回:
- 内存键。
-
Registry.get(NamespacedKey)。