spawnCondition

open fun spawnCondition(@NotNull condition: @NotNull Predicate<PlatformPlayer>)

Appends an additional spawn condition for this tracker.

The specified predicate is combined with the existing spawn condition using a logical AND. Only players who satisfy all chained conditions will be eligible to receive spawn packets for this model.


tracker.spawnCondition(player -> player.hasPermission("custom.model.view"));

Since

3.5.0

Parameters

condition

the spawn condition predicate to combine

Throws

if condition is null