aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0419-Add-Listing-API-for-Player.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0419-Add-Listing-API-for-Player.patch')
-rw-r--r--patches/api/0419-Add-Listing-API-for-Player.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/patches/api/0419-Add-Listing-API-for-Player.patch b/patches/api/0419-Add-Listing-API-for-Player.patch
new file mode 100644
index 0000000000..94d5892bd0
--- /dev/null
+++ b/patches/api/0419-Add-Listing-API-for-Player.patch
@@ -0,0 +1,43 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Corey Shupe <[email protected]>
+Date: Wed, 11 Jan 2023 16:40:31 -0500
+Subject: [PATCH] Add Listing API for Player
+
+
+diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
+index 463521dc80254cab673c5203ee263948081219e9..5753d6d6ae791e2b086c861ddeb6522e46f2571c 100644
+--- a/src/main/java/org/bukkit/entity/Player.java
++++ b/src/main/java/org/bukkit/entity/Player.java
+@@ -2033,6 +2033,32 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
+ */
+ public boolean canSee(@NotNull Entity entity);
+
++ // Paper start
++ /**
++ * Returns whether the {@code other} player is listed for {@code this}.
++ *
++ * @param other The other {@link Player} to check for listing.
++ * @return True if the {@code other} player is listed for {@code this}.
++ */
++ boolean isListed(@NotNull Player other);
++
++ /**
++ * Unlists the {@code other} player from the tablist.
++ *
++ * @param other The other {@link Player} to de-list.
++ * @return True if the {@code other} player was listed.
++ */
++ boolean unlistPlayer(@NotNull Player other);
++
++ /**
++ * Lists the {@code other} player.
++ *
++ * @param other The other {@link Player} to list.
++ * @return True if the {@code other} player was not listed.
++ */
++ boolean listPlayer(@NotNull Player other);
++ // Paper end
++
+ /**
+ * Checks to see if this player is currently flying or not.
+ *