diff --git a/patches/api/0006-Adventure.patch b/patches/api/0006-Adventure.patch index 3e6bd53c7..26674a655 100644 --- a/patches/api/0006-Adventure.patch +++ b/patches/api/0006-Adventure.patch @@ -4596,7 +4596,7 @@ index 9bab73c3c2ca759b8e1c7d07d98cc593c961666a..f0c6943da3f783101ca647b75b3230fa throw new UnsupportedOperationException("Not supported yet."); } diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..ee9fe9a1f4829768ac3a508eabb11fce0addbc60 100644 +index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aeebb9a6fd6 100644 --- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java @@ -34,6 +34,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste @@ -4644,18 +4644,23 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..ee9fe9a1f4829768ac3a508eabb11fce void setDisplayName(@Nullable String name); /** -@@ -62,6 +84,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -62,6 +84,32 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste */ boolean hasItemName(); + // Paper start - /** - * Gets the item name that is set. - *
-@@ -73,6 +96,32 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste - * - * @return the item name that is set - */ ++ /** ++ * Gets the item name component that is set. ++ *
++ * Item name differs from display name in that it is cannot be edited by an ++ * anvil, is not styled with italics, and does not show labels. ++ *

++ * Plugins should check that {@link #hasItemName()} returns true before ++ * calling this method. ++ * ++ * @return the item name that is set ++ * @see #hasItemName() ++ */ + @org.jetbrains.annotations.NotNull + Component itemName(); + @@ -4665,27 +4670,24 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..ee9fe9a1f4829768ac3a508eabb11fce + * Item name differs from display name in that it is cannot be edited by an + * anvil, is not styled with italics, and does not show labels. + * -+ * @param name the name to set ++ * @param name the name to set, null to remove it + */ + void itemName(@Nullable final Component name); + // Paper end -+ /** -+ * Gets the item name that is set. -+ *
-+ * Item name differs from display name in that it is cannot be edited by an -+ * anvil, is not styled with italics, and does not show labels. -+ *

-+ * Plugins should check that hasItemName() returns true before -+ * calling this method. -+ * -+ * @return the item name that is set + /** + * Gets the item name that is set. + *
+@@ -72,7 +120,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste + * calling this method. + * + * @return the item name that is set + * @deprecated in favour of {@link #itemName()} -+ */ + */ + @Deprecated // Paper @NotNull String getItemName(); -@@ -83,7 +132,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -83,7 +133,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste * anvil, is not styled with italics, and does not show labels. * * @param name the name to set @@ -4695,7 +4697,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..ee9fe9a1f4829768ac3a508eabb11fce void setItemName(@Nullable String name); /** -@@ -124,6 +175,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -124,6 +176,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste */ boolean hasLore(); @@ -4720,7 +4722,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..ee9fe9a1f4829768ac3a508eabb11fce /** * Gets the lore that is set. *

-@@ -131,7 +200,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -131,7 +201,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste * calling this method. * * @return a list of lore that is set @@ -4730,7 +4732,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..ee9fe9a1f4829768ac3a508eabb11fce @Nullable List getLore(); -@@ -140,7 +211,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -140,7 +212,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste * Removes lore when given null. * * @param lore the lore that will be set diff --git a/patches/api/0056-Fix-upstream-javadocs.patch b/patches/api/0056-Fix-upstream-javadocs.patch index c5b3f3817..1aa0e4585 100644 --- a/patches/api/0056-Fix-upstream-javadocs.patch +++ b/patches/api/0056-Fix-upstream-javadocs.patch @@ -1438,10 +1438,10 @@ index 07c3dff4d6190ef388d9c1e1c36f67f00a3e8e66..597a18a767b68b47e81454b7d44613c7 * @param input The input choice. * @return The changed recipe, so you can chain calls. diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -index ee9fe9a1f4829768ac3a508eabb11fce0addbc60..75181a4c93347fcdb284bf5d1c4963c9a9f38848 100644 +index 18c2864c99d4dfae16cdb35143486aeebb9a6fd6..d66857825528ee772219440dffa28ad8e820493b 100644 --- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -@@ -512,7 +512,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -513,7 +513,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste /** * Return an immutable copy of all {@link Attribute}s and their * {@link AttributeModifier}s for a given {@link EquipmentSlot}.
diff --git a/patches/api/0172-Fix-Spigot-annotation-mistakes.patch b/patches/api/0172-Fix-Spigot-annotation-mistakes.patch index 546bc1091..6dc3d96c0 100644 --- a/patches/api/0172-Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/0172-Fix-Spigot-annotation-mistakes.patch @@ -1587,10 +1587,10 @@ index 597a18a767b68b47e81454b7d44613c7178c1366..bc3440eb72127824b3961fbdae583bb6 public ItemStack getInput() { return this.ingredient.getItemStack(); diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -index 75181a4c93347fcdb284bf5d1c4963c9a9f38848..b54d2fa93460e12051945a1e24dc713dfe4642eb 100644 +index d66857825528ee772219440dffa28ad8e820493b..3ddd52b135f339ff006b5d53f46487bfbe1ff7fd 100644 --- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -@@ -140,6 +140,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -141,6 +141,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste /** * Checks for existence of a localized name. * @@ -1598,7 +1598,7 @@ index 75181a4c93347fcdb284bf5d1c4963c9a9f38848..b54d2fa93460e12051945a1e24dc713d * @return true if this has a localized name * @deprecated meta no longer exists */ -@@ -152,6 +153,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -153,6 +154,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste * Plugins should check that hasLocalizedName() returns true * before calling this method. * @@ -1606,7 +1606,7 @@ index 75181a4c93347fcdb284bf5d1c4963c9a9f38848..b54d2fa93460e12051945a1e24dc713d * @return the localized name that is set * @deprecated meta no longer exists */ -@@ -162,6 +164,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -163,6 +165,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste /** * Sets the localized name. * diff --git a/patches/api/0200-Support-components-in-ItemMeta.patch b/patches/api/0200-Support-components-in-ItemMeta.patch index bbff18c51..8a3122ea2 100644 --- a/patches/api/0200-Support-components-in-ItemMeta.patch +++ b/patches/api/0200-Support-components-in-ItemMeta.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Support components in ItemMeta diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -index b54d2fa93460e12051945a1e24dc713dfe4642eb..dc17c6b6e4ee62012e4c9ef2076a9313fce0162c 100644 +index 3ddd52b135f339ff006b5d53f46487bfbe1ff7fd..ed12e27a0ed75caa8aa46c3e965ed566a97865cf 100644 --- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java @@ -5,6 +5,7 @@ import java.util.Collection; @@ -54,7 +54,7 @@ index b54d2fa93460e12051945a1e24dc713dfe4642eb..dc17c6b6e4ee62012e4c9ef2076a9313 /** * Checks for existence of an item name. *
-@@ -209,6 +234,19 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -210,6 +235,19 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste @Nullable List getLore(); @@ -74,7 +74,7 @@ index b54d2fa93460e12051945a1e24dc713dfe4642eb..dc17c6b6e4ee62012e4c9ef2076a9313 /** * Sets the lore for this item. * Removes lore when given null. -@@ -219,6 +257,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -220,6 +258,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste @Deprecated // Paper void setLore(@Nullable List lore); diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index 26bd6cef1..3ba9b0bbf 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -5141,7 +5141,7 @@ index 9c57b883783145ad4483481a2c2e7f0f188cd174..b653c2c80e8e8524ea6d7625c6a86f82 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 7a5110efc5af1be6644b7afecd6ac025c20e6794..780b7e971a9d4fda1a9c78790c7969a0799f51ab 100644 +index 7a5110efc5af1be6644b7afecd6ac025c20e6794..b79f29ccd512ec7d2a8f6a885c1a96dfd58e7dc5 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -843,6 +843,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -5170,12 +5170,12 @@ index 7a5110efc5af1be6644b7afecd6ac025c20e6794..780b7e971a9d4fda1a9c78790c7969a0 + // Paper start - Adventure + @Override + public net.kyori.adventure.text.Component itemName() { -+ return io.papermc.paper.adventure.PaperAdventure.asAdventure(itemName); ++ return io.papermc.paper.adventure.PaperAdventure.asAdventure(this.itemName); + } + + @Override + public void itemName(final net.kyori.adventure.text.Component name) { -+ this.itemName = name == null ? null : io.papermc.paper.adventure.PaperAdventure.asVanilla(name); ++ this.itemName = io.papermc.paper.adventure.PaperAdventure.asVanilla(name); + } + // Paper end - Adventure +