Class PaperDialogInput

java.lang.Object
io.github.projectunified.unidialog.paper.input.PaperDialogInput
All Implemented Interfaces:
AdventureSupport
Direct Known Subclasses:
PaperBooleanInput, PaperDialogInputBuilder, PaperNumberRangeInput, PaperSingleOptionInput, PaperTextInput

public abstract class PaperDialogInput extends Object implements AdventureSupport
Base class for dialog inputs on the Paper platform
  • Field Details

    • key

      protected final String key
      The key of the input
  • Constructor Details

    • PaperDialogInput

      protected PaperDialogInput(String key, Function<String,net.kyori.adventure.text.Component> componentDeserializer)
      Constructor for PaperDialogInput
      Parameters:
      key - the input key
      componentDeserializer - a function to deserialize components from strings
  • Method Details

    • getDialogInput

      public abstract io.papermc.paper.registry.data.dialog.input.DialogInput getDialogInput()
      Get the dialog input
      Returns:
      the dialog input
    • getComponentDeserializer

      public Function<String,net.kyori.adventure.text.Component> getComponentDeserializer()
      Description copied from interface: AdventureSupport
      Get the deserializer function that converts a string to a Component
      Specified by:
      getComponentDeserializer in interface AdventureSupport
      Returns:
      the function that deserializes a string into a Component