Fix jukebox playable component not being applied on item meta (#10922)
This commit is contained in:
parent
72883ff600
commit
a362e724b2
5 changed files with 59 additions and 1 deletions
|
@ -1006,6 +1006,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public enum ChatColor {
|
||||
/**
|
||||
* Represents black
|
||||
diff --git a/src/main/java/org/bukkit/JukeboxSong.java b/src/main/java/org/bukkit/JukeboxSong.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/JukeboxSong.java
|
||||
+++ b/src/main/java/org/bukkit/JukeboxSong.java
|
||||
@@ -0,0 +0,0 @@ public interface JukeboxSong extends Keyed, Translatable {
|
||||
private static JukeboxSong get(@NotNull String s) {
|
||||
return Objects.requireNonNull(Registry.JUKEBOX_SONG.get(NamespacedKey.minecraft(s)), "Missing song " + s);
|
||||
}
|
||||
+
|
||||
+ // Paper start - adventure
|
||||
+ /**
|
||||
+ * @deprecated this method assumes that jukebox song description will
|
||||
+ * always be a translatable component which is not guaranteed.
|
||||
+ */
|
||||
+ @Override
|
||||
+ @Deprecated(forRemoval = true)
|
||||
+ @org.jetbrains.annotations.NotNull String getTranslationKey();
|
||||
+ // Paper end - adventure
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Keyed.java b/src/main/java/org/bukkit/Keyed.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Keyed.java
|
||||
|
|
|
@ -1627,6 +1627,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
* @param name the name to set
|
||||
* @deprecated meta no longer exists
|
||||
*/
|
||||
@@ -0,0 +0,0 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
*
|
||||
* @return component
|
||||
*/
|
||||
- @Nullable
|
||||
+ @NotNull // Paper
|
||||
JukeboxPlayableComponent getJukeboxPlayable();
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/MapMeta.java b/src/main/java/org/bukkit/inventory/meta/MapMeta.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/MapMeta.java
|
||||
|
|
|
@ -1561,6 +1561,24 @@ diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/ja
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
@@ -0,0 +0,0 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* The returned component is a snapshot of its current state and does not
|
||||
* reflect a live view of what is on an item. After changing any value on
|
||||
* this component, it must be set with
|
||||
- * {@link #setJukeboxPlayable(org.bukkit.inventory.meta.components.JukeboxComponent)}
|
||||
+ * {@link #setJukeboxPlayable(org.bukkit.inventory.meta.components.JukeboxPlayableComponent)}
|
||||
* to apply the changes.
|
||||
*
|
||||
* @return component
|
||||
@@ -0,0 +0,0 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
JukeboxPlayableComponent getJukeboxPlayable();
|
||||
|
||||
/**
|
||||
- * Sets the item tool.
|
||||
+ * Sets the jukebox playable component.
|
||||
*
|
||||
* @param jukeboxPlayable new component
|
||||
*/
|
||||
@@ -0,0 +0,0 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
/**
|
||||
* Return an immutable copy of all {@link Attribute}s and their
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue