Class PESingleOptionInput
java.lang.Object
io.github.projectunified.unidialog.packetevents.input.PEDialogInput
io.github.projectunified.unidialog.packetevents.input.PESingleOptionInput
- All Implemented Interfaces:
AdventureSingleOptionInput<PESingleOptionInput>
,AdventureSupport
,SingleOptionInput<PESingleOptionInput>
public class PESingleOptionInput
extends PEDialogInput
implements AdventureSingleOptionInput<PESingleOptionInput>
-
Field Summary
Fields inherited from interface io.github.projectunified.unidialog.core.input.SingleOptionInput
DEFAULT_WIDTH
-
Constructor Summary
ConstructorsConstructorDescriptionPESingleOptionInput
(Function<String, net.kyori.adventure.text.Component> componentDeserializer) -
Method Summary
Methods inherited from class io.github.projectunified.unidialog.packetevents.input.PEDialogInput
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
-
PESingleOptionInput
-
-
Method Details
-
width
Description copied from interface:SingleOptionInput
Set the width of the input- Specified by:
width
in interfaceSingleOptionInput<PESingleOptionInput>
- Parameters:
width
- the width- Returns:
- the current instance for method chaining
-
label
Description copied from interface:AdventureSingleOptionInput
Set the label for the input- Specified by:
label
in interfaceAdventureSingleOptionInput<PESingleOptionInput>
- Parameters:
label
- the label text- Returns:
- the current instance for method chaining
-
option
public PESingleOptionInput 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<PESingleOptionInput>
- 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
-
getInput
public com.github.retrooper.packetevents.protocol.dialog.input.InputControl getInput()- Specified by:
getInput
in classPEDialogInput
-