mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-17 06:48:23 +01:00
386df52297
5a0150f586ed3eb15fe6f1f596d1a5a7d806f0f9 Fix ITEM_BREAK e6a3911057bd94d8bd7021cbb4923fb84fb106d1 Upstream merge d1cdcf8d4c3639f956474f02ed662517cffbe23e Remove old patch 068df64aeee368377e1673667bffc7a6dcf90554 Rebuild all patches
92 lines
No EOL
3.9 KiB
Diff
92 lines
No EOL
3.9 KiB
Diff
From 0000000000000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -0,0 +0,0 @@ public final class Bukkit {
|
|
* <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 static Player getPlayer(String name) {
|
|
return server.getPlayer(name);
|
|
}
|
|
@@ -0,0 +0,0 @@ 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);
|
|
}
|
|
@@ -0,0 +0,0 @@ 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<Player> 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -0,0 +0,0 @@ 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);
|
|
|
|
/**
|
|
@@ -0,0 +0,0 @@ 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);
|
|
|
|
/**
|
|
--
|