ViewerPlayers

public final class ViewerPlayers

The online players among a packet entity's viewers, in viewer order. A packet entity asks for them with every update it queues, and they rarely change, so the last list is handed out again while every viewer still resolves to the same player object; any difference (a viewer added, removed, gone offline or back with a new player object) builds a new list. Lists are never changed once handed out, so a queued bundle can keep one while the next update runs on another thread.

Constructors

Link copied to clipboard
public void ViewerPlayers()

Functions

Link copied to clipboard
public List<Player> of(Iterable<UUID> viewers)
The online players among viewers, as Bukkit.getPlayer resolves them; unmodifiable.