runTaskFor

abstract fun <T> runTaskFor(entity: McServerEntity, task: Supplier<T>, loader: Any? = null): CompletableFuture<T>

Schedules a task to run on the game tick thread for a given entity.

Parameters

entity

Entity to execute the task with.

task

Task that will be scheduled for the execution.

loader

Loader object identified with this task.


open fun <T> runTaskFor(entity: McServerEntity, task: Supplier<T>): CompletableFuture<T>

Schedules a task to run on the game tick thread for a given entity.

Parameters

entity

Entity to execute the task with.

task

Task that will be scheduled for the execution.