isFinished

infix fun isFinished(isTaskFinished: BooleanSupplier): DynamicTask

Returning true will end the task.