Interface SingleOptionInput<T extends SingleOptionInput<T>>

Type Parameters:
T - the type of the implementing class, for method chaining
All Known Subinterfaces:
AdventureSingleOptionInput<T>
All Known Implementing Classes:
PaperSingleOptionInput, PESingleOptionInput, SpigotSingleOptionInput

public interface SingleOptionInput<T extends SingleOptionInput<T>>
Interface for single option input types in a dialog.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    label(@Nullable String label)
    Set the label for the input
    default T
    option(String id, String display)
    Add an option to the input
    option(String id, String display, boolean isDefault)
    Add an option to the input
    width(int width)
    Set the width of the input
  • Field Details

  • Method Details

    • width

      T width(int width)
      Set the width of the input
      Parameters:
      width - the width
      Returns:
      the current instance for method chaining
    • label

      T label(@Nullable @Nullable String label)
      Set the label for the input
      Parameters:
      label - the label text
      Returns:
      the current instance for method chaining
    • option

      T option(String id, String 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)
      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