Package org.bukkit
Class MusicInstrument
java.lang.Object
org.bukkit.MusicInstrument
- All Implemented Interfaces:
Keyed
,Translatable
,Keyed
-
Field Summary
Modifier and TypeFieldDescriptionstatic final MusicInstrument
static final MusicInstrument
static final MusicInstrument
static final MusicInstrument
static final MusicInstrument
static final MusicInstrument
static final MusicInstrument
static final MusicInstrument
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable MusicInstrument
getByKey
(@NotNull NamespacedKey namespacedKey) Deprecated.abstract @NotNull NamespacedKey
getKey()
Deprecated, for removal: This API element is subject to removal in a future version.key()
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.this method assumes that the instrument description always be a translatable component which is not guaranteed.static @NotNull Collection
<MusicInstrument> values()
Deprecated.useIterable.iterator()
.
-
Field Details
-
PONDER_GOAT_HORN
-
SING_GOAT_HORN
-
SEEK_GOAT_HORN
-
FEEL_GOAT_HORN
-
ADMIRE_GOAT_HORN
-
CALL_GOAT_HORN
-
YEARN_GOAT_HORN
-
DREAM_GOAT_HORN
-
-
Constructor Details
-
MusicInstrument
public MusicInstrument()
-
-
Method Details
-
getByKey
@Nullable @Deprecated(since="1.20.1") public static @Nullable MusicInstrument getByKey(@NotNull @NotNull NamespacedKey namespacedKey) Deprecated.UseRegistry.get(NamespacedKey)
instead.Returns aMusicInstrument
by aNamespacedKey
.- Parameters:
namespacedKey
- the key- Returns:
- the event or null
-
values
Deprecated.useIterable.iterator()
.Returns all known MusicInstruments.- Returns:
- the memoryKeys
-
getKey
@Deprecated(forRemoval=true, since="1.20.5") @NotNull public abstract @NotNull NamespacedKey getKey()Deprecated, for removal: This API element is subject to removal in a future version.useRegistry.getKey(Keyed)
,RegistryAccess.getRegistry(io.papermc.paper.registry.RegistryKey)
, andRegistryKey.INSTRUMENT
. MusicInstruments can exist without a key.Description copied from interface:Keyed
Return the namespaced identifier for this object. -
key
Deprecated, for removal: This API element is subject to removal in a future version.useRegistry.getKey(Keyed)
,RegistryAccess.getRegistry(io.papermc.paper.registry.RegistryKey)
, andRegistryKey.INSTRUMENT
. MusicInstruments can exist without a key.Description copied from interface:Keyed
Returns the unique identifier for this object. -
translationKey
Deprecated, for removal: This API element is subject to removal in a future version.this method assumes that the instrument description always be a translatable component which is not guaranteed.Description copied from interface:net.kyori.adventure.translation.Translatable
Gets the translation key.- Specified by:
translationKey
in interfaceTranslatable
- Returns:
- the translation key
-
Registry.get(NamespacedKey)
instead.