mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-20 22:31:34 +01:00
use legacySection() instead of legacyAmpersand() (#488)
This commit is contained in:
parent
022ec237ba
commit
b94d196021
@ -70,7 +70,7 @@ public class WritableBookMeta extends ItemMeta implements ItemMetaBuilder.Provid
|
|||||||
handleCollection(pages, "pages", () -> {
|
handleCollection(pages, "pages", () -> {
|
||||||
NBTList<NBTString> list = new NBTList<>(NBTTypes.TAG_String);
|
NBTList<NBTString> list = new NBTList<>(NBTTypes.TAG_String);
|
||||||
for (Component page : pages) {
|
for (Component page : pages) {
|
||||||
list.add(new NBTString(LegacyComponentSerializer.legacyAmpersand().serialize(page)));
|
list.add(new NBTString(LegacyComponentSerializer.legacySection().serialize(page)));
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
});
|
});
|
||||||
@ -94,7 +94,7 @@ public class WritableBookMeta extends ItemMeta implements ItemMetaBuilder.Provid
|
|||||||
if (nbtCompound.containsKey("pages")) {
|
if (nbtCompound.containsKey("pages")) {
|
||||||
final NBTList<NBTString> list = nbtCompound.getList("pages");
|
final NBTList<NBTString> list = nbtCompound.getList("pages");
|
||||||
for (NBTString page : list) {
|
for (NBTString page : list) {
|
||||||
this.pages.add(LegacyComponentSerializer.legacyAmpersand().deserialize(page.getValue()));
|
this.pages.add(LegacyComponentSerializer.legacySection().deserialize(page.getValue()));
|
||||||
}
|
}
|
||||||
pages(pages);
|
pages(pages);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user