TrackedPacketEntity

public interface TrackedPacketEntity

Interface for packet entities that want automatic visibility management. Entities implementing this interface can register with PacketEntityTracker to automatically show/hide based on player distance.

Inheritors

Functions

Link copied to clipboard
public boolean canBeSeenBy(Player player)
Checks whether a player is allowed to see this entity, independent of range and world.
Link copied to clipboard
public abstract Set<UUID> getCurrentViewers()
Gets all players who can currently see this entity.
Link copied to clipboard
public abstract Location getTrackingLocation()
Gets the location used for tracking distance.
Link copied to clipboard
public abstract UUID getUniqueId()
Gets the unique identifier for this entity.
Link copied to clipboard
public abstract Entity getVehicle()
Gets the vehicle entity this is attached to, if any.
Link copied to clipboard
public abstract World getWorld()
Gets the world this entity is in.
Link copied to clipboard
public abstract void hideFromPlayer(Player player)
Hides this entity from a player.
Link copied to clipboard
public abstract boolean isValid()
Checks if this entity is still valid and should be tracked.
Link copied to clipboard
public abstract boolean isVisibleTo(Player player)
Checks if this entity is currently visible to a player.
Link copied to clipboard
public abstract void remount()
Called when the entity needs to remount to its vehicle.
Link copied to clipboard
public abstract void showToPlayer(Player player)
Shows this entity to a player.
Link copied to clipboard
public void updateTracking()
Updates a moving anchor before visibility is evaluated.