use legacySection() instead of legacyAmpersand() (#488)

This commit is contained in:
Andre Roldan 2021-10-09 21:19:32 -05:00 committed by GitHub
parent 022ec237ba
commit b94d196021
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,7 +70,7 @@ public class WritableBookMeta extends ItemMeta implements ItemMetaBuilder.Provid
handleCollection(pages, "pages", () -> {
NBTList<NBTString> list = new NBTList<>(NBTTypes.TAG_String);
for (Component page : pages) {
list.add(new NBTString(LegacyComponentSerializer.legacyAmpersand().serialize(page)));
list.add(new NBTString(LegacyComponentSerializer.legacySection().serialize(page)));
}
return list;
});
@ -94,7 +94,7 @@ public class WritableBookMeta extends ItemMeta implements ItemMetaBuilder.Provid
if (nbtCompound.containsKey("pages")) {
final NBTList<NBTString> list = nbtCompound.getList("pages");
for (NBTString page : list) {
this.pages.add(LegacyComponentSerializer.legacyAmpersand().deserialize(page.getValue()));
this.pages.add(LegacyComponentSerializer.legacySection().deserialize(page.getValue()));
}
pages(pages);
}
@ -105,4 +105,4 @@ public class WritableBookMeta extends ItemMeta implements ItemMetaBuilder.Provid
return WritableBookMeta.Builder::new;
}
}
}
}