From 3273a33a465bff6429fee9dc45156a49aa8ec813 Mon Sep 17 00:00:00 2001 From: Corey Shupe Date: Wed, 11 Jan 2023 16:40:31 -0500 Subject: [PATCH] Add Listing API for Player --- .../main/java/org/bukkit/entity/Player.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Player.java b/paper-api/src/main/java/org/bukkit/entity/Player.java index ad8e53bc52..094c2056f4 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Player.java +++ b/paper-api/src/main/java/org/bukkit/entity/Player.java @@ -2078,6 +2078,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. *