3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00
Paper/patches/api/0260-Expose-Tracked-Players.patch
2023-04-04 11:47:16 +02:00

24 Zeilen
928 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 e212fcb53c9d2f8aad3e1582b64de1743f2efbfc..368a308e5420f9a9ed403358e7224d2df67a89bb 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -826,5 +826,12 @@ 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
+ */
+ @NotNull Set<Player> getTrackedPlayers();
// Paper end
}