From 09a64a60ff4e9f9041bb04632df95c08310d01b2 Mon Sep 17 00:00:00 2001 From: Doc Date: Thu, 16 Jan 2025 19:46:49 +1100 Subject: [PATCH] #1093: Add MusicInstrument fields for description, range, duration and sound --- src/main/java/org/bukkit/MusicInstrument.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/main/java/org/bukkit/MusicInstrument.java b/src/main/java/org/bukkit/MusicInstrument.java index a64e4b77..3668fe97 100644 --- a/src/main/java/org/bukkit/MusicInstrument.java +++ b/src/main/java/org/bukkit/MusicInstrument.java @@ -18,6 +18,36 @@ public abstract class MusicInstrument implements Keyed, RegistryAware { public static final MusicInstrument YEARN_GOAT_HORN = getInstrument("yearn_goat_horn"); public static final MusicInstrument DREAM_GOAT_HORN = getInstrument("dream_goat_horn"); + /** + * Gets how long the use duration is for the instrument. + * + * @return the duration. + */ + public abstract float getDuration(); + + /** + * Gets the range of the sound. + * + * @return the range of the sound. + */ + public abstract float getRange(); + + /** + * Gets the description of this instrument. + * + * @return the description. + */ + @NotNull + public abstract String getDescription(); + + /** + * Gets the sound/sound-event for this instrument. + * + * @return a sound. + */ + @NotNull + public abstract Sound getSoundEvent(); + /** * {@inheritDoc} *