schedule

open fun schedule(period: Long, @NotNull handler: @NotNull Consumer<TrackerBundlerSet>)

Registers a periodic handler on the tracker's 50 ms tick schedule. The handler runs when the tracker tick count is a multiple of the period.


tracker.schedule(20, handler); // Every second

Since

1.15.2

Parameters

period

the positive period in Minecraft ticks

handler

the packet handler

Throws

if the handler is null

if the period is zero or negative