From c156e89f425ccca38742028b46d68482ecdbeff3 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 17 Apr 2023 19:33:15 +1000 Subject: [PATCH] SPIGOT-6308: Deprecate the location name property of map items This property does not have the expected effect. By: blablubbabc --- .../main/java/org/bukkit/inventory/meta/MapMeta.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/inventory/meta/MapMeta.java b/paper-api/src/main/java/org/bukkit/inventory/meta/MapMeta.java index 347ec4230a..32055a8890 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/meta/MapMeta.java +++ b/paper-api/src/main/java/org/bukkit/inventory/meta/MapMeta.java @@ -107,7 +107,10 @@ public interface MapMeta extends ItemMeta { * Checks for existence of a location name. * * @return true if this has a location name + * @deprecated This method does not have the expected effect and is + * actually an alias for {@link ItemMeta#hasLocalizedName()}. */ + @Deprecated boolean hasLocationName(); /** @@ -117,16 +120,21 @@ public interface MapMeta extends ItemMeta { * before calling this method. * * @return the location name that is set + * @deprecated This method does not have the expected effect and is + * actually an alias for {@link ItemMeta#getLocalizedName()}. */ + @Deprecated @Nullable String getLocationName(); /** - * Sets the location name. A custom map color will alter the display of the - * map in an inventory slot. + * Sets the location name. * * @param name the name to set + * @deprecated This method does not have the expected effect and is + * actually an alias for {@link ItemMeta#setLocalizedName(String)}. */ + @Deprecated void setLocationName(@Nullable String name); /**