Class PaperSingleOptionInput
java.lang.Object
io.github.projectunified.unidialog.paper.input.PaperDialogInput
io.github.projectunified.unidialog.paper.input.PaperSingleOptionInput
- All Implemented Interfaces:
AdventureSingleOptionInput<PaperSingleOptionInput>
,AdventureSupport
,SingleOptionInput<PaperSingleOptionInput>
public class PaperSingleOptionInput
extends PaperDialogInput
implements AdventureSingleOptionInput<PaperSingleOptionInput>
-
Field Summary
Fields inherited from class io.github.projectunified.unidialog.paper.input.PaperDialogInput
key
Fields inherited from interface io.github.projectunified.unidialog.core.input.SingleOptionInput
DEFAULT_WIDTH
-
Constructor Summary
ConstructorsConstructorDescriptionPaperSingleOptionInput
(String key, Function<String, net.kyori.adventure.text.Component> componentDeserializer) -
Method Summary
Methods inherited from class io.github.projectunified.unidialog.paper.input.PaperDialogInput
getComponentDeserializer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.projectunified.unidialog.adventure.input.AdventureSingleOptionInput
label, option, option
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
-
Constructor Details
-
PaperSingleOptionInput
-
-
Method Details
-
label
Description copied from interface:AdventureSingleOptionInput
Set the label for the input- Specified by:
label
in interfaceAdventureSingleOptionInput<PaperSingleOptionInput>
- Parameters:
label
- the label text- Returns:
- the current instance for method chaining
-
option
public PaperSingleOptionInput option(String id, net.kyori.adventure.text.Component display, boolean isDefault) Description copied from interface:AdventureSingleOptionInput
Add an option to the input- Specified by:
option
in interfaceAdventureSingleOptionInput<PaperSingleOptionInput>
- Parameters:
id
- the identifier for the optiondisplay
- the display text for the optionisDefault
- whether this option is the default selection- Returns:
- the current instance for method chaining
-
width
Description copied from interface:SingleOptionInput
Set the width of the input- Specified by:
width
in interfaceSingleOptionInput<PaperSingleOptionInput>
- Parameters:
width
- the width- Returns:
- the current instance for method chaining
-
getDialogInput
public io.papermc.paper.registry.data.dialog.input.DialogInput getDialogInput()- Specified by:
getDialogInput
in classPaperDialogInput
-