mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 14:33:09 +01:00
Fix signed book page serialization (#10696)
This commit is contained in:
parent
702864d8f8
commit
f9008ceb01
1 changed files with 15 additions and 0 deletions
|
@ -179,6 +179,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
|
||||
}
|
||||
|
||||
if (this.pages != null) {
|
||||
- builder.put(CraftMetaBookSigned.BOOK_PAGES.BUKKIT, ImmutableList.copyOf(this.pages));
|
||||
+ // Paper start - deserialization expects json
|
||||
+ final List<String> jsonPages = new ArrayList<>(this.pages.size());
|
||||
+ for (final Component page : this.pages) {
|
||||
+ jsonPages.add(CraftChatMessage.toJSON(page));
|
||||
+ }
|
||||
+ builder.put(CraftMetaBookSigned.BOOK_PAGES.BUKKIT, ImmutableList.copyOf(jsonPages));
|
||||
+ // Paper end - deserialization expects json
|
||||
}
|
||||
|
||||
if (this.resolved) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java
|
||||
|
|
Loading…
Reference in a new issue