mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-27 02:21:38 +01:00
Fix WritableBookMeta cloning
This commit is contained in:
parent
69adb67394
commit
604d10a06c
@ -19,6 +19,7 @@ public class WritableBookMeta extends ItemMeta {
|
||||
*
|
||||
* @return a modifiable {@link ArrayList} containing the book pages
|
||||
*/
|
||||
@NotNull
|
||||
public ArrayList<String> getPages() {
|
||||
return pages;
|
||||
}
|
||||
@ -28,7 +29,7 @@ public class WritableBookMeta extends ItemMeta {
|
||||
*
|
||||
* @param pages the pages list
|
||||
*/
|
||||
public void setPages(ArrayList<String> pages) {
|
||||
public void setPages(@NotNull ArrayList<String> pages) {
|
||||
this.pages = pages;
|
||||
}
|
||||
|
||||
@ -69,6 +70,8 @@ public class WritableBookMeta extends ItemMeta {
|
||||
@NotNull
|
||||
@Override
|
||||
public ItemMeta clone() {
|
||||
return super.clone();
|
||||
WritableBookMeta writableBookMeta = (WritableBookMeta) super.clone();
|
||||
writableBookMeta.pages = new ArrayList<>(pages);
|
||||
return writableBookMeta;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user