mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 22:13:42 +01:00
24 lines
935 B
Diff
24 lines
935 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 2c892de67ecca09e490246186c8d2eccf91f3536..18795003815d5bb6e04a15256430f69a31b2ace5 100644
|
|
--- a/src/main/java/org/bukkit/entity/Entity.java
|
|
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
|
@@ -760,5 +760,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
|
* Check if entity is inside a ticking chunk
|
|
*/
|
|
public 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
|
|
+ */
|
|
+ @NotNull Set<Player> getTrackedPlayers();
|
|
// Paper end
|
|
}
|