Package cloud.commandframework.tasks
Class TaskRecipe.TaskRecipeComponentVoid<I>
- java.lang.Object
-
- cloud.commandframework.tasks.TaskRecipe.TaskRecipeComponentVoid<I>
-
- Type Parameters:
I- Input type
- Enclosing class:
- TaskRecipe
public final class TaskRecipe.TaskRecipeComponentVoid<I> extends java.lang.ObjectRepresents a partial recipe
-
-
Method Summary
Modifier and Type Method Description TaskRecipe.TaskRecipeComponentVoid<I>asynchronous(@NonNull TaskConsumer<I> consumer)Add a new asynchronous step, consuming the input of the earlier stepvoidexecute()Execute the recipevoidexecute(@NonNull java.lang.Runnable callback)Execute the recipeTaskRecipe.TaskRecipeComponentVoid<I>synchronous(@NonNull TaskConsumer<I> consumer)Add a new synchronous step, consuming the input of the earlier step
-
-
-
Method Detail
-
synchronous
public TaskRecipe.TaskRecipeComponentVoid<I> synchronous(@NonNull TaskConsumer<I> consumer)
Add a new synchronous step, consuming the input of the earlier step- Parameters:
consumer- Consumer that consumes the input- Returns:
- New task recipe component
-
asynchronous
public TaskRecipe.TaskRecipeComponentVoid<I> asynchronous(@NonNull TaskConsumer<I> consumer)
Add a new asynchronous step, consuming the input of the earlier step- Parameters:
consumer- Consumer that consumes the input- Returns:
- New task recipe component
-
execute
public void execute(@NonNull java.lang.Runnable callback)
Execute the recipe- Parameters:
callback- Callback function
-
execute
public void execute()
Execute the recipe
-
-