Paper/patches/api/0259-Expose-Tracked-Players.patch
Nassim Jahnke 8e8d6aeeb0 Finish API
2023-12-05 18:33:18 +01:00

26 lines
1019 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tom <cryptite@gmail.com>
Date: Fri, 26 Feb 2021 16:24:25 -0600
Subject: [PATCH] Expose Tracked Players
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 9eb90abcdd5ee78e495b2b53ed8643593e9485d3..d98fe98f703ff478ea4427783fd68debe9a6f267 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -885,5 +885,14 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
* Check if entity is inside a ticking chunk
*/
boolean isTicking();
+
+ /**
+ * Returns a set of {@link Player Players} within this entity's tracking range (players that can "see" this entity).
+ *
+ * @return players in tracking range
+ * @deprecated slightly misleading name, use {@link #getTrackedBy()}
+ */
+ @Deprecated
+ @NotNull Set<Player> getTrackedPlayers();
// Paper end
}