Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Commit

Permalink
Remove deprecation on some player lookup methods
Browse files Browse the repository at this point in the history
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 <name> impossible without causing compiler warnings. We will maintain this API and it should be considered safe and appropriate for most use cases.
  • Loading branch information
md-5 authored and SpigotMC committed Sep 4, 2014
1 parent b3b4107 commit 3a559f0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
3 changes: 0 additions & 3 deletions src/main/java/org/bukkit/Bukkit.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,13 @@ public static String getUpdateFolder() {
/**
* @see Server#getPlayer(String name)
*/
@Deprecated
public static Player getPlayer(String name) {
return server.getPlayer(name);
}

/**
* @see Server#matchPlayer(String name)
*/
@Deprecated
public static List<Player> matchPlayer(String name) {
return server.matchPlayer(name);
}
Expand Down Expand Up @@ -448,7 +446,6 @@ public static OfflinePlayer getOfflinePlayer(UUID id) {
/**
* @see Server#getPlayerExact(String name)
*/
@Deprecated
public static Player getPlayerExact(String name) {
return server.getPlayerExact(name);
}
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/org/bukkit/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -308,23 +308,17 @@ public interface Server extends PluginMessageRecipient {
* <p>
* 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);

/**
Expand All @@ -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<Player> matchPlayer(String name);

/**
Expand Down

0 comments on commit 3a559f0

Please sign in to comment.