Undeprecate getOfflinePlayer (#7773)
This commit is contained in:
parent
2ab0258b5a
commit
f6a69dedb9
10 changed files with 65 additions and 41 deletions
|
@ -9,10 +9,22 @@ a ton of noise to plugin developers.
|
|||
These do not help plugin developers if they bring moise noise than value.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index ca6f3a18ca8902b99c1c8c21b6da5def7fdb2aa8..b2acdd8bf213b779ac3afaac7026bc22eb5cdb8d 100644
|
||||
index ca6f3a18ca8902b99c1c8c21b6da5def7fdb2aa8..b4256e2c66e3f578a4499dc1fff50f213898b96b 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1699,7 +1699,7 @@ public final class Bukkit {
|
||||
@@ -1158,10 +1158,8 @@ public final class Bukkit {
|
||||
* @param name the name the player to retrieve
|
||||
* @return an offline player
|
||||
* @see #getOfflinePlayer(java.util.UUID)
|
||||
- * @deprecated Persistent storage of users should be by UUID as names are no longer
|
||||
- * unique past a single session.
|
||||
*/
|
||||
- @Deprecated
|
||||
+ // @Deprecated // Paper
|
||||
@NotNull
|
||||
public static OfflinePlayer getOfflinePlayer(@NotNull String name) {
|
||||
return server.getOfflinePlayer(name);
|
||||
@@ -1699,7 +1697,7 @@ public final class Bukkit {
|
||||
*
|
||||
* @return the scoreboard manager or null if no worlds are loaded.
|
||||
*/
|
||||
|
@ -21,7 +33,7 @@ index ca6f3a18ca8902b99c1c8c21b6da5def7fdb2aa8..b2acdd8bf213b779ac3afaac7026bc22
|
|||
public static ScoreboardManager getScoreboardManager() {
|
||||
return server.getScoreboardManager();
|
||||
}
|
||||
@@ -1996,7 +1996,7 @@ public final class Bukkit {
|
||||
@@ -1996,7 +1994,7 @@ public final class Bukkit {
|
||||
* @param clazz the class of the tag entries
|
||||
* @return the tag or null
|
||||
*/
|
||||
|
@ -101,10 +113,22 @@ index 01bcb3a1bdb5accdf844d0178cec3d25746b3eaa..236c9aea9ffc36269e5c32eacc9f1fd6
|
|||
Preconditions.checkArgument(namespace != null && VALID_NAMESPACE.matcher(namespace).matches(), "Invalid namespace. Must be [a-z0-9._-]: %s", namespace);
|
||||
Preconditions.checkArgument(key != null && VALID_KEY.matcher(key).matches(), "Invalid key. Must be [a-z0-9/._-]: %s", key);
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 28be40d6844f801c26e8359e509afc5e3dedd71f..cd2cfaf24c794bb0c64cd613d933b6fba92ed723 100644
|
||||
index 28be40d6844f801c26e8359e509afc5e3dedd71f..e0ad194697b0333e760ee5d66dac406921018479 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1445,7 +1445,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -985,10 +985,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @param name the name the player to retrieve
|
||||
* @return an offline player
|
||||
* @see #getOfflinePlayer(java.util.UUID)
|
||||
- * @deprecated Persistent storage of users should be by UUID as names are no longer
|
||||
- * unique past a single session.
|
||||
*/
|
||||
- @Deprecated
|
||||
+ // @Deprecated // Paper
|
||||
@NotNull
|
||||
public OfflinePlayer getOfflinePlayer(@NotNull String name);
|
||||
|
||||
@@ -1445,7 +1443,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*
|
||||
* @return the scoreboard manager or null if no worlds are loaded.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue