Class PaperTextInput

java.lang.Object
io.github.projectunified.unidialog.paper.input.PaperDialogInput
io.github.projectunified.unidialog.paper.input.PaperTextInput
All Implemented Interfaces:
AdventureTextInput<PaperTextInput>, AdventureSupport, TextInput<PaperTextInput>

public class PaperTextInput extends PaperDialogInput implements AdventureTextInput<PaperTextInput>
  • Constructor Details

    • PaperTextInput

      public PaperTextInput(String key, Function<String,net.kyori.adventure.text.Component> componentDeserializer)
  • Method Details

    • label

      public PaperTextInput label(@Nullable @Nullable net.kyori.adventure.text.Component label)
      Description copied from interface: AdventureTextInput
      Set the label for the input
      Specified by:
      label in interface AdventureTextInput<PaperTextInput>
      Parameters:
      label - the label text
      Returns:
      the current instance for method chaining
    • width

      public PaperTextInput width(int width)
      Description copied from interface: TextInput
      Set the width of the input
      Specified by:
      width in interface TextInput<PaperTextInput>
      Parameters:
      width - the width
      Returns:
      the current instance for method chaining
    • initial

      public PaperTextInput initial(String initial)
      Description copied from interface: TextInput
      Set the initial value for the input
      Specified by:
      initial in interface TextInput<PaperTextInput>
      Parameters:
      initial - the initial text
      Returns:
      the current instance for method chaining
    • maxLength

      public PaperTextInput maxLength(int maxLength)
      Description copied from interface: TextInput
      Set the maximum length of the input text
      Specified by:
      maxLength in interface TextInput<PaperTextInput>
      Parameters:
      maxLength - the maximum number of characters allowed
      Returns:
      the current instance for method chaining
    • maxLines

      public PaperTextInput maxLines(@Nullable @Nullable Integer maxLines)
      Description copied from interface: TextInput
      Set the maximum number of lines for the input
      Specified by:
      maxLines in interface TextInput<PaperTextInput>
      Parameters:
      maxLines - the maximum number of lines allowed
      Returns:
      the current instance for method chaining
    • height

      public PaperTextInput height(@Nullable @Nullable Integer height)
      Description copied from interface: TextInput
      Set the height of the input
      Specified by:
      height in interface TextInput<PaperTextInput>
      Parameters:
      height - the height
      Returns:
      the current instance for method chaining
    • getDialogInput

      public io.papermc.paper.registry.data.dialog.input.DialogInput getDialogInput()
      Specified by:
      getDialogInput in class PaperDialogInput