mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-24 18:07:39 +01:00
cab333b217
Don't send requests of every player was found in the global api cache SpigotMC/Spigot@841270ff1e Correctly set the response code for the cached lookups and return the ... SpigotMC/Spigot@f170b7899c Don't try and re-set the global api cache on reload SpigotMC/Spigot@b410a00a66 Use a compile time sneaky throw hack. SpigotMC/Spigot@508462b96b Fix a missed rename in WorldGenGroundBush SpigotMC/Spigot@0614d8fae9
80 lines
3.0 KiB
Diff
80 lines
3.0 KiB
Diff
From 350a5f4e14e622512b2a91e3f08f52ed4ef6802b Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
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 <name> 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 7b25817..34f44af 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -197,7 +197,6 @@ public final class Bukkit {
|
|
/**
|
|
* @see Server#getPlayer(String name)
|
|
*/
|
|
- @Deprecated
|
|
public static Player getPlayer(String name) {
|
|
return server.getPlayer(name);
|
|
}
|
|
@@ -205,7 +204,6 @@ public final class Bukkit {
|
|
/**
|
|
* @see Server#matchPlayer(String name)
|
|
*/
|
|
- @Deprecated
|
|
public static List<Player> matchPlayer(String name) {
|
|
return server.matchPlayer(name);
|
|
}
|
|
@@ -448,7 +446,6 @@ public final class Bukkit {
|
|
/**
|
|
* @see Server#getPlayerExact(String name)
|
|
*/
|
|
- @Deprecated
|
|
public static Player getPlayerExact(String name) {
|
|
return server.getPlayerExact(name);
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
|
index e14e9f1..14c8a8a 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 {
|
|
* <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);
|
|
|
|
/**
|
|
@@ -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);
|
|
|
|
/**
|
|
--
|
|
1.9.1
|
|
|