From b56970d39417d87648c7814ae08cf9fbb7403ad5 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 7 Apr 2024 01:45:43 +0100 Subject: [PATCH] Allow player-list API to self un/list (#10358) --- patches/server/Add-Listing-API-for-Player.patch | 2 -- 1 file changed, 2 deletions(-) diff --git a/patches/server/Add-Listing-API-for-Player.patch b/patches/server/Add-Listing-API-for-Player.patch index 462ef1c697..3aa75974c5 100644 --- a/patches/server/Add-Listing-API-for-Player.patch +++ b/patches/server/Add-Listing-API-for-Player.patch @@ -145,7 +145,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public boolean unlistPlayer(@NotNull Player other) { + Preconditions.checkNotNull(other, "hidden entity cannot be null"); + if (this.getHandle().connection == null) return false; -+ if (this.equals(other)) return false; + if (!this.canSee(other)) return false; + + if (unlistedEntities.add(other.getUniqueId())) { @@ -160,7 +159,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public boolean listPlayer(@NotNull Player other) { + Preconditions.checkNotNull(other, "hidden entity cannot be null"); + if (this.getHandle().connection == null) return false; -+ if (this.equals(other)) return false; + if (!this.canSee(other)) throw new IllegalStateException("Player cannot see other player"); + + if (this.unlistedEntities.remove(other.getUniqueId())) {