-
public class DynamicCommandBuilder extends CommandBuilder<DynamicCommand>
-
-
Field Summary
Fields Modifier and Type Field Description public Supplier<Boolean>
triggerCondition
public Runnable
runnable
public Supplier<Boolean>
stopCondition
-
Method Summary
Modifier and Type Method Description DynamicCommandBuilder
when(Supplier<Boolean> triggerCondition)
Sets the trigger condition for the command. DynamicCommandBuilder
when(Function<CommandConditionBuilder, Supplier<Boolean>> conditionFunction)
Sets the trigger condition for the command. DynamicCommandBuilder
execute(Runnable runnable)
Sets the command lambda. DynamicCommandBuilder
until(Supplier<Boolean> stopCondition)
Sets the command stop condition. DynamicCommand
build(String commandName)
Builds the command. -
-
Method Detail
-
when
DynamicCommandBuilder when(Supplier<Boolean> triggerCondition)
Sets the trigger condition for the command.
- Parameters:
triggerCondition
- trigger condition.
-
when
DynamicCommandBuilder when(Function<CommandConditionBuilder, Supplier<Boolean>> conditionFunction)
Sets the trigger condition for the command.
- Parameters:
conditionFunction
- condition provider.
-
execute
DynamicCommandBuilder execute(Runnable runnable)
Sets the command lambda.
- Parameters:
runnable
- command lambda.
-
until
DynamicCommandBuilder until(Supplier<Boolean> stopCondition)
Sets the command stop condition.
- Parameters:
stopCondition
- stop condition lambda
-
-
-
-