Commits

Doc authored and md_5 committed 09a64a60ff4
#1093: Add MusicInstrument fields for description, range, duration and sound
No tags

src/main/java/org/bukkit/MusicInstrument.java

Modified
11 11
12 12 public static final MusicInstrument PONDER_GOAT_HORN = getInstrument("ponder_goat_horn");
13 13 public static final MusicInstrument SING_GOAT_HORN = getInstrument("sing_goat_horn");
14 14 public static final MusicInstrument SEEK_GOAT_HORN = getInstrument("seek_goat_horn");
15 15 public static final MusicInstrument FEEL_GOAT_HORN = getInstrument("feel_goat_horn");
16 16 public static final MusicInstrument ADMIRE_GOAT_HORN = getInstrument("admire_goat_horn");
17 17 public static final MusicInstrument CALL_GOAT_HORN = getInstrument("call_goat_horn");
18 18 public static final MusicInstrument YEARN_GOAT_HORN = getInstrument("yearn_goat_horn");
19 19 public static final MusicInstrument DREAM_GOAT_HORN = getInstrument("dream_goat_horn");
20 20
21 + /**
22 + * Gets how long the use duration is for the instrument.
23 + *
24 + * @return the duration.
25 + */
26 + public abstract float getDuration();
27 +
28 + /**
29 + * Gets the range of the sound.
30 + *
31 + * @return the range of the sound.
32 + */
33 + public abstract float getRange();
34 +
35 + /**
36 + * Gets the description of this instrument.
37 + *
38 + * @return the description.
39 + */
40 + @NotNull
41 + public abstract String getDescription();
42 +
43 + /**
44 + * Gets the sound/sound-event for this instrument.
45 + *
46 + * @return a sound.
47 + */
48 + @NotNull
49 + public abstract Sound getSoundEvent();
50 +
21 51 /**
22 52 * {@inheritDoc}
23 53 *
24 54 * @see #getKeyOrThrow()
25 55 * @see #isRegistered()
26 56 * @deprecated A key might not always be present, use {@link #getKeyOrThrow()} instead.
27 57 */
28 58 @NotNull
29 59 @Override
30 60 @Deprecated(since = "1.21.4")

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut