compile fixes

This commit is contained in:
Jason Penilla 2024-04-24 21:38:28 -07:00
parent ce0e78c103
commit 25f7c68e6b
No known key found for this signature in database
GPG key ID: 0E75A301420E48F8
14 changed files with 35 additions and 28 deletions

View file

@ -5037,7 +5037,7 @@ index 6691950f6ffb8b6bf70d5aaf011ec9b476974d19..31054e7e1d69bfeeb2ddee5bfeb8ee50
+ // 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 625035216d1ce4ab965b5eef15f1201fc5df576b..01773a85fd9a30a0925826ef038a867a13d5b919 100644
index 625035216d1ce4ab965b5eef15f1201fc5df576b..18efbab29f20436848894c66541aa6c7d3481aae 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 {
@ -5047,12 +5047,12 @@ index 625035216d1ce4ab965b5eef15f1201fc5df576b..01773a85fd9a30a0925826ef038a867a
+ // Paper start
+ @Override
+ public net.kyori.adventure.text.Component displayName() {
+ return displayName == null ? null : net.kyori.adventure.text.serializer.gson.GsonComponentSerializer.gson().deserialize(displayName);
+ return displayName == null ? null : io.papermc.paper.adventure.PaperAdventure.asAdventure(displayName);
+ }
+
+ @Override
+ public void displayName(final net.kyori.adventure.text.Component displayName) {
+ this.displayName = displayName == null ? null : net.kyori.adventure.text.serializer.gson.GsonComponentSerializer.gson().serialize(displayName);
+ this.displayName = displayName == null ? null : io.papermc.paper.adventure.PaperAdventure.asVanilla(displayName);
+ }
+ // Paper end
+
@ -5066,12 +5066,12 @@ index 625035216d1ce4ab965b5eef15f1201fc5df576b..01773a85fd9a30a0925826ef038a867a
+ // Paper start
+ @Override
+ public List<net.kyori.adventure.text.Component> lore() {
+ return this.lore != null ? io.papermc.paper.adventure.PaperAdventure.asAdventureFromJson(this.lore) : null;
+ return this.lore != null ? io.papermc.paper.adventure.PaperAdventure.asAdventure(this.lore) : null;
+ }
+
+ @Override
+ public void lore(final List<? extends net.kyori.adventure.text.Component> lore) {
+ this.lore = lore != null ? io.papermc.paper.adventure.PaperAdventure.asJson(lore) : null;
+ this.lore = lore != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(lore) : null;
+ }
+ // Paper end
+