1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-18 11:22:15 +01:00

: Add Entity#getTrackedBy

By: Jishuna <joshl5324@gmail.com>
This commit is contained in:
Bukkit/Spigot 2023-10-03 07:26:54 +11:00
parent be348c55c4
commit 21f10876d1

View file

@ -547,6 +547,20 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
@ApiStatus.Experimental
public boolean isVisibleByDefault();
/**
* Get all players that are currently tracking this entity.
* <p>
* 'Tracking' means that this entity has been sent to the player and that
* they are receiving updates on its state. Note that the client's {@code
* 'Entity Distance'} setting does not affect the range at which entities
* are tracked.
*
* @return the players tracking this entity, or an empty set if none
*/
@NotNull
@ApiStatus.Experimental
Set<Player> getTrackedBy();
/**
* Sets whether the entity has a team colored (default: white) glow.
*