From 51980b97efa73bdcd52b3eddac9ff0c68e28dbcc Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 14 Jan 2019 20:43:09 +1100 Subject: [PATCH] Deprecate some methods By: md_5 --- paper-api/src/main/java/org/bukkit/Bukkit.java | 4 ++++ paper-api/src/main/java/org/bukkit/Server.java | 4 ++++ .../src/main/java/org/bukkit/inventory/Inventory.java | 7 +++++++ 3 files changed, 15 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/Bukkit.java b/paper-api/src/main/java/org/bukkit/Bukkit.java index d16357eac7..df6930fb5b 100644 --- a/paper-api/src/main/java/org/bukkit/Bukkit.java +++ b/paper-api/src/main/java/org/bukkit/Bukkit.java @@ -187,7 +187,9 @@ public final class Bukkit { * Get the name of this server. * * @return the name of this server + * @deprecated not a standard server property */ + @Deprecated public static String getServerName() { return server.getServerName(); } @@ -197,7 +199,9 @@ public final class Bukkit { * that can be used for uniquely identifying this server. * * @return the ID of this server + * @deprecated not a standard server property */ + @Deprecated public static String getServerId() { return server.getServerId(); } diff --git a/paper-api/src/main/java/org/bukkit/Server.java b/paper-api/src/main/java/org/bukkit/Server.java index 23b1344bb1..f94f2958f1 100644 --- a/paper-api/src/main/java/org/bukkit/Server.java +++ b/paper-api/src/main/java/org/bukkit/Server.java @@ -157,7 +157,9 @@ public interface Server extends PluginMessageRecipient { * Get the name of this server. * * @return the name of this server + * @deprecated not a standard server property */ + @Deprecated public String getServerName(); /** @@ -165,7 +167,9 @@ public interface Server extends PluginMessageRecipient { * that can be used for uniquely identifying this server. * * @return the ID of this server + * @deprecated not a standard server property */ + @Deprecated public String getServerId(); /** diff --git a/paper-api/src/main/java/org/bukkit/inventory/Inventory.java b/paper-api/src/main/java/org/bukkit/inventory/Inventory.java index 2dbba00120..3585f1099a 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/Inventory.java +++ b/paper-api/src/main/java/org/bukkit/inventory/Inventory.java @@ -51,7 +51,11 @@ public interface Inventory extends Iterable { * Returns the name of the inventory * * @return The String with the name of the inventory + * @deprecated different instances of the same inventory may have different names; + * it is not clear what this method is meant to return + * @see InventoryView#getTitle() */ + @Deprecated public String getName(); /** @@ -320,7 +324,10 @@ public interface Inventory extends Iterable { * Returns the title of this inventory. * * @return A String with the title. + * @deprecated different instances of the same inventory may have different titles + * @see InventoryView#getTitle() */ + @Deprecated public String getTitle(); /**