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 Object
Represents a partial recipe
  • Method Details

    • 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 Runnable callback)
      Execute the recipe
      Parameters:
      callback - Callback function
    • execute

      public void execute()
      Execute the recipe