mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 18:45:54 +01:00
fix: wrong return in javadocs for bookmeta (#5579)
Closes #5574. Reviewed-by: Mariell Hoversholm <proximyst@proximyst.com>
This commit is contained in:
parent
3dbb8926e5
commit
c649585082
@ -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.
|
||||
+ * <p>
|
||||
@ -3402,7 +3404,7 @@ index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaa
|
||||
/**
|
||||
* Gets the specified page in the book. The given page must exist.
|
||||
* <p>
|
||||
@@ -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<String> getPages();
|
||||
|
||||
/**
|
||||
@@ -157,7 +276,9 @@ public interface BookMeta extends ItemMeta {
|
||||
@@ -157,7 +278,9 @@ public interface BookMeta extends ItemMeta {
|
||||
* pages. Maximum 100 pages with 256 characters per page.
|
||||
*
|
||||
* @param pages A list of pages to set the book to use
|
||||
@ -3443,7 +3445,7 @@ index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaa
|
||||
void setPages(@NotNull List<String> pages);
|
||||
|
||||
/**
|
||||
@@ -165,7 +286,9 @@ public interface BookMeta extends ItemMeta {
|
||||
@@ -165,7 +288,9 @@ public interface BookMeta extends ItemMeta {
|
||||
* pages. Maximum 50 pages with 256 characters per page.
|
||||
*
|
||||
* @param pages A list of strings, each being a page
|
||||
@ -3453,7 +3455,7 @@ index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaa
|
||||
void setPages(@NotNull String... pages);
|
||||
|
||||
/**
|
||||
@@ -173,7 +296,9 @@ public interface BookMeta extends ItemMeta {
|
||||
@@ -173,7 +298,9 @@ public interface BookMeta extends ItemMeta {
|
||||
* 256 characters per page.
|
||||
*
|
||||
* @param pages A list of strings, each being a page
|
||||
@ -3463,7 +3465,7 @@ index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaa
|
||||
void addPage(@NotNull String... pages);
|
||||
|
||||
/**
|
||||
@@ -195,8 +320,10 @@ public interface BookMeta extends ItemMeta {
|
||||
@@ -195,8 +322,10 @@ public interface BookMeta extends ItemMeta {
|
||||
*
|
||||
* @param page the page number to get
|
||||
* @return the page from the book
|
||||
@ -3474,7 +3476,7 @@ index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaa
|
||||
public BaseComponent[] getPage(int page) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -210,7 +337,9 @@ public interface BookMeta extends ItemMeta {
|
||||
@@ -210,7 +339,9 @@ public interface BookMeta extends ItemMeta {
|
||||
*
|
||||
* @param page the page number to set
|
||||
* @param data the data to set for that page
|
||||
@ -3484,7 +3486,7 @@ index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaa
|
||||
public void setPage(int page, @Nullable BaseComponent... data) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -219,8 +348,10 @@ public interface BookMeta extends ItemMeta {
|
||||
@@ -219,8 +350,10 @@ public interface BookMeta extends ItemMeta {
|
||||
* Gets all the pages in the book.
|
||||
*
|
||||
* @return list of all the pages in the book
|
||||
@ -3495,7 +3497,7 @@ index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaa
|
||||
public List<BaseComponent[]> getPages() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -230,7 +361,9 @@ public interface BookMeta extends ItemMeta {
|
||||
@@ -230,7 +363,9 @@ public interface BookMeta extends ItemMeta {
|
||||
* pages. Maximum 50 pages with 256 characters per page.
|
||||
*
|
||||
* @param pages A list of pages to set the book to use
|
||||
@ -3505,7 +3507,7 @@ index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaa
|
||||
public void setPages(@NotNull List<BaseComponent[]> pages) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -240,7 +373,9 @@ public interface BookMeta extends ItemMeta {
|
||||
@@ -240,7 +375,9 @@ public interface BookMeta extends ItemMeta {
|
||||
* pages. Maximum 50 pages with 256 characters per page.
|
||||
*
|
||||
* @param pages A list of component arrays, each being a page
|
||||
@ -3515,7 +3517,7 @@ index 94852d50e88d0594b84b581cd627174043629995..fdbd32c4bb6428f2dde484ecb53acdaa
|
||||
public void setPages(@NotNull BaseComponent[]... pages) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -250,7 +385,9 @@ public interface BookMeta extends ItemMeta {
|
||||
@@ -250,7 +387,9 @@ public interface BookMeta extends ItemMeta {
|
||||
* with 256 characters per page.
|
||||
*
|
||||
* @param pages A list of component arrays, each being a page
|
||||
|
Loading…
Reference in New Issue
Block a user