From 0481feec570804ac47a5edfdf6f88586216d019a Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sun, 25 Aug 2024 11:56:17 -0700 Subject: [PATCH] Deprecate API relating to menu title changes (#11309) --- .../api/Fix-Spigot-annotation-mistakes.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/patches/api/Fix-Spigot-annotation-mistakes.patch b/patches/api/Fix-Spigot-annotation-mistakes.patch index 31db5ed7a..b840b7095 100644 --- a/patches/api/Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/Fix-Spigot-annotation-mistakes.patch @@ -1538,6 +1538,27 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public ItemStack getCursor(); /** +@@ -0,0 +0,0 @@ public interface InventoryView { + * made using {@link #setTitle(String)}. + * + * @return the original title ++ * @deprecated changing the title is not supported + */ + @NotNull ++ @Deprecated(since = "1.21.1") // Paper + public String getOriginalTitle(); + + /** +@@ -0,0 +0,0 @@ public interface InventoryView { + * exception. + * + * @param title The new title. ++ * @deprecated changing the title is not supported. This method has ++ * poorly defined and broken behaviors. It should not be used. + */ ++ @Deprecated(since = "1.21.1") // Paper + public void setTitle(@NotNull String title); + } diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/inventory/ItemFactory.java