diff --git a/patches/api/Adventure.patch b/patches/api/Adventure.patch index 5c0bf6a2a7..5f782fb6eb 100644 --- a/patches/api/Adventure.patch +++ b/patches/api/Adventure.patch @@ -766,6 +766,27 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 /** * Gets the custom name on a mob or block. If there is no name this method * will return null. +@@ -0,0 +0,0 @@ public interface Nameable { + * This value has no effect on players, they will always use their real + * name. + * ++ * @deprecated in favour of {@link #customName()} + * @return name of the mob/block or null + */ ++ @Deprecated // Paper + @Nullable + public String getCustomName(); + +@@ -0,0 +0,0 @@ public interface Nameable { + * This value has no effect on players, they will always use their real + * name. + * ++ * @deprecated in favour of {@link #customName(net.kyori.adventure.text.Component)} + * @param name the name to set + */ ++ @Deprecated // Paper + public void setCustomName(@Nullable String name); + } diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/NamespacedKey.java @@ -1894,7 +1915,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 /** @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * pack correctly. + * + * ++ * @deprecated in favour of {@link #setResourcePack(String, byte[], Component)} + * @param url The URL from which the client will download the resource + * pack. The string must contain only US-ASCII characters and should + * be encoded as per RFC 1738. +@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * @throws IllegalArgumentException Thrown if the hash is not 20 bytes + * long. */ ++ @Deprecated // Paper public void setResourcePack(@NotNull String url, @Nullable byte[] hash, @Nullable String prompt); + // Paper start @@ -1949,10 +1981,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * Request that the player's client download and switch resource packs. *

@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * pack correctly. + * + * ++ * @deprecated in favour of {@link #setResourcePack(String, byte[], Component, boolean)} + * @param url The URL from which the client will download the resource + * pack. The string must contain only US-ASCII characters and should + * be encoded as per RFC 1738. +@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * @throws IllegalArgumentException Thrown if the hash is not 20 bytes + * long. */ ++ @Deprecated // Paper public void setResourcePack(@NotNull String url, @Nullable byte[] hash, @Nullable String prompt, boolean force); -+ // Paper end ++ // Paper start + /** + * Request that the player's client download and switch resource packs. + *

@@ -3373,19 +3416,6 @@ 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.checkerframework.common.returnsreceiver.qual.This; - 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. @@ -3422,7 +3452,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + @NotNull + @Override -+ @This BookMeta title(@Nullable net.kyori.adventure.text.Component title); ++ @org.checkerframework.common.returnsreceiver.qual.This BookMeta title(@Nullable net.kyori.adventure.text.Component title); + + /** + * Gets the author of the book. @@ -3444,7 +3474,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + @NotNull + @Override -+ @This BookMeta author(@Nullable net.kyori.adventure.text.Component author); ++ @org.checkerframework.common.returnsreceiver.qual.This BookMeta author(@Nullable net.kyori.adventure.text.Component author); ++ + /** + * Gets the specified page in the book. The page must exist. + *

@@ -3505,7 +3536,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + + @Override -+ @NonNull ++ @org.checkerframework.checker.nullness.qual.NonNull + BookMetaBuilder toBuilder(); + + // Paper end