3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 19:10:09 +01:00
Paper/patches/api/0270-Expose-Tracked-Players.patch

24 Zeilen
928 B
Diff

2021-06-11 14:02:28 +02:00
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
2022-10-11 14:43:10 +02:00
index 277dc1f3a0002f5102bc2a6be4412d179bbdb713..e3218b5c170e1916a991aa1fae6a4f4e26dc034d 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
2022-10-11 14:43:10 +02:00
@@ -800,5 +800,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
* Check if entity is inside a ticking chunk
*/
2022-10-11 14:43:10 +02:00
boolean isTicking();
+
2021-06-11 14:02:28 +02:00
+ /**
+ * Returns a set of {@link Player Players} within this entity's tracking range (players that can "see" this entity).
+ *
+ * @return players in tracking range
2021-06-11 14:02:28 +02:00
+ */
+ @NotNull Set<Player> getTrackedPlayers();
// Paper end
}