#800: Add support for NoteBlock sounds in Skulls

By: Doc <nachito94@msn.com>
This commit is contained in:
Bukkit/Spigot
2022-12-23 12:26:04 +11:00
parent 05e63c40e1
commit 9048c2fc06
4 changed files with 81 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
package org.bukkit.inventory.meta;
import org.bukkit.NamespacedKey;
import org.bukkit.OfflinePlayer;
import org.bukkit.profile.PlayerProfile;
import org.jetbrains.annotations.NotNull;
@@ -79,6 +80,27 @@ public interface SkullMeta extends ItemMeta {
*/
void setOwnerProfile(@Nullable PlayerProfile profile);
/**
* Sets the sound to play if the skull is placed on a note block.
* <br>
* <strong>Note:</strong> This only works for player heads. For other heads,
* see {@link org.bukkit.Instrument}.
*
* @param noteBlockSound the key of the sound to be played, or null
*/
void setNoteBlockSound(@Nullable NamespacedKey noteBlockSound);
/**
* Gets the sound to play if the skull is placed on a note block.
* <br>
* <strong>Note:</strong> This only works for player heads. For other heads,
* see {@link org.bukkit.Instrument}.
*
* @return the key of the sound, or null
*/
@Nullable
NamespacedKey getNoteBlockSound();
@Override
@NotNull
SkullMeta clone();