aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0228-Add-getOfflinePlayerIfCached-String.patch
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2022-06-07 18:52:56 +0200
committerNassim Jahnke <[email protected]>2022-06-07 18:52:56 +0200
commitcb05aa6b8b312a8a99fe05b9ddb516d5466a0351 (patch)
treeaf13f78acc1f738e406e626cc9a0988698b79bdb /patches/api/0228-Add-getOfflinePlayerIfCached-String.patch
parent276d830d223ddf68611beacc248285ae5a4e8a1f (diff)
downloadPaper-cb05aa6b8b312a8a99fe05b9ddb516d5466a0351.tar.gz
Paper-cb05aa6b8b312a8a99fe05b9ddb516d5466a0351.zip
Prepare for 1.19 dev
Diffstat (limited to 'patches/api/0228-Add-getOfflinePlayerIfCached-String.patch')
-rw-r--r--patches/api/0228-Add-getOfflinePlayerIfCached-String.patch68
1 files changed, 0 insertions, 68 deletions
diff --git a/patches/api/0228-Add-getOfflinePlayerIfCached-String.patch b/patches/api/0228-Add-getOfflinePlayerIfCached-String.patch
deleted file mode 100644
index 7ec8fffe49..0000000000
--- a/patches/api/0228-Add-getOfflinePlayerIfCached-String.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: oxygencraft <[email protected]>
-Date: Sun, 25 Oct 2020 18:35:58 +1100
-Subject: [PATCH] Add getOfflinePlayerIfCached(String)
-
-
-diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
-index f9fdb1882a283e47604136a27d1c95266b988a37..8072924c977e0a23ee743ca8d613b9ea5de885fa 100644
---- a/src/main/java/org/bukkit/Bukkit.java
-+++ b/src/main/java/org/bukkit/Bukkit.java
-@@ -1188,6 +1188,27 @@ public final class Bukkit {
- return server.getOfflinePlayer(name);
- }
-
-+ // Paper start
-+ /**
-+ * Gets the player by the given name, regardless if they are offline or
-+ * online.
-+ * <p>
-+ * This will not make a web request to get the UUID for the given name,
-+ * thus this method will not block. However this method will return
-+ * {@code null} if the player is not cached.
-+ * </p>
-+ *
-+ * @param name the name of the player to retrieve
-+ * @return an offline player if cached, {@code null} otherwise
-+ * @see #getOfflinePlayer(String)
-+ * @see #getOfflinePlayer(java.util.UUID)
-+ */
-+ @Nullable
-+ public static OfflinePlayer getOfflinePlayerIfCached(@NotNull String name) {
-+ return server.getOfflinePlayerIfCached(name);
-+ }
-+ // Paper end
-+
- /**
- * Gets the player by the given UUID, regardless if they are offline or
- * online.
-diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
-index a7ba813396fab77bed292422f881b5a0952972fb..afed6bcf923166065ac9f63dd96191cd42eefcb9 100644
---- a/src/main/java/org/bukkit/Server.java
-+++ b/src/main/java/org/bukkit/Server.java
-@@ -1006,6 +1006,25 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
- @NotNull
- public OfflinePlayer getOfflinePlayer(@NotNull String name);
-
-+ // Paper start
-+ /**
-+ * Gets the player by the given name, regardless if they are offline or
-+ * online.
-+ * <p>
-+ * This will not make a web request to get the UUID for the given name,
-+ * thus this method will not block. However this method will return
-+ * {@code null} if the player is not cached.
-+ * </p>
-+ *
-+ * @param name the name of the player to retrieve
-+ * @return an offline player if cached, {@code null} otherwise
-+ * @see #getOfflinePlayer(String)
-+ * @see #getOfflinePlayer(java.util.UUID)
-+ */
-+ @Nullable
-+ public OfflinePlayer getOfflinePlayerIfCached(@NotNull String name);
-+ // Paper end
-+
- /**
- * Gets the player by the given UUID, regardless if they are offline or
- * online.