Fix missing CraftMetaBook#toBuilder override

This commit is contained in:
Shane Freeder 2021-05-06 17:27:19 +01:00
parent 28d6fe5def
commit 084ee854f8
2 changed files with 31 additions and 0 deletions

View File

@ -2901,6 +2901,18 @@ diff --git a/src/main/java/org/bukkit/inventory/meta/BookMeta.java b/src/main/ja
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/inventory/meta/BookMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/BookMeta.java
@@ -0,0 +0,0 @@
package org.bukkit.inventory.meta;
import java.util.List;
+
+import net.kyori.adventure.inventory.Book;
import net.md_5.bungee.api.chat.BaseComponent;
import org.bukkit.Material;
+import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
* Represents a book ({@link Material#WRITABLE_BOOK} or {@link
* Material#WRITTEN_BOOK}) that can have a title, an author, and pages.
@ -3017,6 +3029,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @Override
+ BookMeta build();
+ }
+
+ @Override
+ @NonNull
+ BookMetaBuilder toBuilder();
+
+ // Paper end
+
/**

View File

@ -2651,6 +2651,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.CraftChatMessage;
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
import org.bukkit.inventory.meta.BookMeta;
import org.bukkit.inventory.meta.BookMeta.Generation;
+import org.checkerframework.checker.nullness.qual.NonNull;
// Spigot start
import static org.spigotmc.ValidateUtils.*;
@@ -0,0 +0,0 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
this.generation = (generation == null) ? null : generation.ordinal();
}
@ -2783,6 +2791,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return new CraftMetaBook(title, author, pages);
+ }
+ }
+
+ @Override
+ public BookMetaBuilder toBuilder() {
+ return new CraftMetaBookBuilder();
+ }
+
+ // Paper end
@Override
public String getPage(final int page) {