diff options
Diffstat (limited to 'patches/server/0010-Adventure.patch')
-rw-r--r-- | patches/server/0010-Adventure.patch | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index 19562689dd..3ba9b0bbf2 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..3cb5685a97f67d759537fc92bb4cb376bb2905a7 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 { @@ -5163,7 +5163,26 @@ index 7a5110efc5af1be6644b7afecd6ac025c20e6794..3cb5685a97f67d759537fc92bb4cb376 @Override public String getDisplayName() { return CraftChatMessage.fromComponent(this.displayName); -@@ -892,6 +904,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -873,6 +885,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + return this.itemName != null; + } + ++ // Paper start - Adventure ++ @Override ++ public net.kyori.adventure.text.Component itemName() { ++ return io.papermc.paper.adventure.PaperAdventure.asAdventure(this.itemName); ++ } ++ ++ @Override ++ public void itemName(final net.kyori.adventure.text.Component name) { ++ this.itemName = io.papermc.paper.adventure.PaperAdventure.asVanilla(name); ++ } ++ // Paper end - Adventure ++ + @Override + public String getLocalizedName() { + return this.getDisplayName(); +@@ -892,6 +916,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return this.lore != null && !this.lore.isEmpty(); } |