diff --git a/Spigot-API-Patches/0005-Adventure.patch b/Spigot-API-Patches/0005-Adventure.patch index 4e4b42205..4e1baf14f 100644 --- a/Spigot-API-Patches/0005-Adventure.patch +++ b/Spigot-API-Patches/0005-Adventure.patch @@ -3261,10 +3261,10 @@ index f70a6a22b85ff0da76e67e9b223ad4e0b020b5c4..a15abec467bac70116a6fc21a300d493 + // Paper end } diff --git a/src/main/java/org/bukkit/inventory/meta/BookMeta.java b/src/main/java/org/bukkit/inventory/meta/BookMeta.java -index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaaba2a0d18 100644 +index 94852d50e88d0594b84b581cd627174043629995..4947251f347d83fa326a67735293401c10d87ba4 100644 --- a/src/main/java/org/bukkit/inventory/meta/BookMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/BookMeta.java -@@ -1,8 +1,11 @@ +@@ -1,8 +1,12 @@ package org.bukkit.inventory.meta; import java.util.List; @@ -3273,10 +3273,11 @@ index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaa import net.md_5.bungee.api.chat.BaseComponent; import org.bukkit.Material; +import org.checkerframework.checker.nullness.qual.NonNull; ++import org.checkerframework.common.returnsreceiver.qual.This; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -@@ -10,7 +13,7 @@ import org.jetbrains.annotations.Nullable; +@@ -10,7 +14,7 @@ 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. */ @@ -3285,7 +3286,7 @@ index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaa /** * Represents the generation (or level of copying) of a written book -@@ -119,6 +122,116 @@ public interface BookMeta extends ItemMeta { +@@ -119,6 +123,117 @@ public interface BookMeta extends ItemMeta { */ boolean hasPages(); @@ -3308,11 +3309,11 @@ index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaa + * Limited to 32 characters. Removes title when given null. + * + * @param title the title to set -+ * @return true if the title was successfully set ++ * @return the same {@link BookMeta} instance + */ + @NotNull + @Override -+ BookMeta title(@Nullable net.kyori.adventure.text.Component title); ++ @This BookMeta title(@Nullable net.kyori.adventure.text.Component title); + + /** + * Gets the author of the book. @@ -3330,10 +3331,11 @@ index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaa + * Sets the author of the book. Removes author when given null. + * + * @param author the author to set ++ * @return the same {@link BookMeta} instance + */ + @NotNull + @Override -+ BookMeta author(@Nullable net.kyori.adventure.text.Component author); ++ @This BookMeta author(@Nullable net.kyori.adventure.text.Component author); + /** + * Gets the specified page in the book. The page must exist. + *
@@ -3402,7 +3404,7 @@ index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaa /** * Gets the specified page in the book. The given page must exist. *
-@@ -126,8 +239,10 @@ public interface BookMeta extends ItemMeta {
+@@ -126,8 +241,10 @@ public interface BookMeta extends ItemMeta {
*
* @param page the page number to get, in range [1, getPageCount()]
* @return the page from the book
@@ -3413,7 +3415,7 @@ index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaa
String getPage(int page);
/**
-@@ -141,15 +256,19 @@ public interface BookMeta extends ItemMeta {
+@@ -141,15 +258,19 @@ public interface BookMeta extends ItemMeta {
*
* @param page the page number to set, in range [1, getPageCount()]
* @param data the data to set for that page
@@ -3433,7 +3435,7 @@ index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaa
List