ConditionalTask

constructor(trueTask: Task, falseTask: Task, condition: BooleanSupplier)

Create a new conditional task with the given tasks and condition.

Parameters

trueTask

the task to run if the condition is true

falseTask

the task to run if the condition is false

condition

the condition to evaluate


constructor(onTrue: Runnable, onFalse: Runnable, condition: BooleanSupplier)

Create a new conditional task with the given callbacks and condition.

Parameters

onTrue

the callback to run if the condition is true

onFalse

the callback to run if the condition is false

condition

the condition to evaluate