Interface AdventureSingleOptionInput<T extends AdventureSingleOptionInput<T>>

Type Parameters:
T - the type of the input, for method chaining
All Superinterfaces:
AdventureSupport, SingleOptionInput<T>
All Known Implementing Classes:
PaperSingleOptionInput, PESingleOptionInput

public interface AdventureSingleOptionInput<T extends AdventureSingleOptionInput<T>> extends SingleOptionInput<T>, AdventureSupport
An extension of SingleOptionInput that provides additional methods for handling Component labels and options.
  • Field Summary

    Fields inherited from interface io.github.projectunified.unidialog.core.input.SingleOptionInput

    DEFAULT_WIDTH
  • Method Summary

    Modifier and Type
    Method
    Description
    default T
    label(@Nullable String label)
    Set the label for the input
    label(@Nullable net.kyori.adventure.text.Component label)
    Set the label for the input
    default T
    option(String id, String display, boolean isDefault)
    Add an option to the input
    default T
    option(String id, net.kyori.adventure.text.Component display)
    Add an option to the input
    option(String id, net.kyori.adventure.text.Component display, boolean isDefault)
    Add an option to the input

    Methods inherited from interface io.github.projectunified.unidialog.adventure.support.AdventureSupport

    deserialize, getComponentDeserializer

    Methods inherited from interface io.github.projectunified.unidialog.core.input.SingleOptionInput

    option, width
  • Method Details

    • label

      T label(@Nullable @Nullable net.kyori.adventure.text.Component label)
      Set the label for the input
      Parameters:
      label - the label text
      Returns:
      the current instance for method chaining
    • label

      default T label(@Nullable @Nullable String label)
      Description copied from interface: SingleOptionInput
      Set the label for the input
      Specified by:
      label in interface SingleOptionInput<T extends AdventureSingleOptionInput<T>>
      Parameters:
      label - the label text
      Returns:
      the current instance for method chaining
    • option

      T option(String id, net.kyori.adventure.text.Component display, boolean isDefault)
      Add an option to the input
      Parameters:
      id - the identifier for the option
      display - the display text for the option
      isDefault - whether this option is the default selection
      Returns:
      the current instance for method chaining
    • option

      default T option(String id, String display, boolean isDefault)
      Description copied from interface: SingleOptionInput
      Add an option to the input
      Specified by:
      option in interface SingleOptionInput<T extends AdventureSingleOptionInput<T>>
      Parameters:
      id - the identifier for the option
      display - the display text for the option
      isDefault - whether this option is the default selection
      Returns:
      the current instance for method chaining
    • option

      default T option(String id, net.kyori.adventure.text.Component display)
      Add an option to the input
      Parameters:
      id - the identifier for the option
      display - the display text for the option
      Returns:
      the current instance for method chaining