From 993b4ff544073462f7d9b0aae0eb4464c32e3170 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 30 Mar 2014 15:58:22 +1100 Subject: [PATCH] Remove deprecation on some player lookup methods Most of these methods still have plenty of use given that only one player with each name can exist at a time. Deprecating these methods renders even basic functionality such as /msg impossible without causing compiler warnings. We will maintain this API and it should be considered safe and appropriate for most use cases. diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java index c535498..95d8c80 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -372,12 +372,9 @@ public final class Bukkit { *

* This method may not return objects for offline players. * - * @deprecated Use {@link #getPlayer(UUID)} as player names are no longer - * guaranteed to be unique * @param name the name to look up * @return a player if one was found, null otherwise */ - @Deprecated public static Player getPlayer(String name) { return server.getPlayer(name); } @@ -385,12 +382,9 @@ public final class Bukkit { /** * Gets the player with the exact given name, case insensitive. * - * @deprecated Use {@link #getPlayer(UUID)} as player names are no longer - * guaranteed to be unique * @param name Exact name of the player to retrieve * @return a player object if one was found, null otherwise */ - @Deprecated public static Player getPlayerExact(String name) { return server.getPlayerExact(name); } @@ -402,12 +396,9 @@ public final class Bukkit { * This list is not sorted in any particular order. If an exact match is * found, the returned list will only contain a single result. * - * @deprecated Use {@link #getPlayer(UUID)} as player names are no longer - * guaranteed to be unique * @param name the (partial) name to match * @return list of all possible players */ - @Deprecated public static List matchPlayer(String name) { return server.matchPlayer(name); } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java index 2892a28..52dd005 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -308,23 +308,17 @@ public interface Server extends PluginMessageRecipient { *

* This method may not return objects for offline players. * - * @deprecated Use {@link #getPlayer(UUID)} as player names are no longer - * guaranteed to be unique * @param name the name to look up * @return a player if one was found, null otherwise */ - @Deprecated public Player getPlayer(String name); /** * Gets the player with the exact given name, case insensitive. * - * @deprecated Use {@link #getPlayer(UUID)} as player names are no longer - * guaranteed to be unique * @param name Exact name of the player to retrieve * @return a player object if one was found, null otherwise */ - @Deprecated public Player getPlayerExact(String name); /** @@ -334,12 +328,9 @@ public interface Server extends PluginMessageRecipient { * This list is not sorted in any particular order. If an exact match is * found, the returned list will only contain a single result. * - * @deprecated Use {@link #getPlayer(UUID)} as player names are no longer - * guaranteed to be unique * @param name the (partial) name to match * @return list of all possible players */ - @Deprecated public List matchPlayer(String name); /** -- 2.1.4