Interface PromptOption.Builder

Enclosing interface:
PromptOption

public static interface PromptOption.Builder
A builder to create an option definition with.
Since:
5.2.240903
  • Method Details

    • name

      @Contract("_ -> this") @NotNull @NotNull PromptOption.Builder name(@NotNull @NotNull String name)
      Configures the name of this option.
      Parameters:
      name - The option name.
      Returns:
      This builder instance.
      Since:
      5.2.240903
    • items

      @Contract("_ -> this") @NotNull @NotNull PromptOption.Builder items(@NotNull @NotNull List<PromptOptionItem> items)
      Configures the selectable items of the option.
      Parameters:
      items - The list option items.
      Returns:
      This builder instance.
      Since:
      5.2.240903
    • addItem

      @Contract("_ -> this") @NotNull @NotNull PromptOption.Builder addItem(@NotNull @NotNull PromptOptionItem item)
      Adds another selectable item to this option.
      Parameters:
      item - The option item to be added.
      Returns:
      This builder instance.
      Since:
      5.2.240903
    • create

      @NotNull @NotNull PromptOption create(@NotNull @NotNull UUID id)
      Creates a new option definition based on the current configuration.
      Parameters:
      id - The unique identifier of the option.
      Returns:
      The resulting operation.
      Since:
      5.2.240903