* Add itemName components (Resolves ##10467) * improve javadocs and formatting * rebased --------- Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
This commit is contained in:
@@ -5163,6 +5163,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return CraftChatMessage.fromComponent(this.displayName);
|
||||
@@ -0,0 +0,0 @@ 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();
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
return this.lore != null && !this.lore.isEmpty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user