Class SpigotSingleOptionInput
java.lang.Object
io.github.projectunified.unidialog.spigot.input.SpigotDialogInput
io.github.projectunified.unidialog.spigot.input.SpigotSingleOptionInput
- All Implemented Interfaces:
SingleOptionInput<SpigotSingleOptionInput>
public class SpigotSingleOptionInput
extends SpigotDialogInput
implements SingleOptionInput<SpigotSingleOptionInput>
-
Field Summary
Fields inherited from class io.github.projectunified.unidialog.spigot.input.SpigotDialogInput
key
Fields inherited from interface io.github.projectunified.unidialog.core.input.SingleOptionInput
DEFAULT_WIDTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.md_5.bungee.api.dialog.input.DialogInput
Set the label for the inputlabel
(@Nullable net.md_5.bungee.api.chat.BaseComponent label) Set the label for the inputAdd an option to the inputAdd an option to the inputAdd an option to the inputwidth
(int width) Set the width of the inputMethods 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.core.input.SingleOptionInput
option
-
Constructor Details
-
SpigotSingleOptionInput
-
-
Method Details
-
width
Description copied from interface:SingleOptionInput
Set the width of the input- Specified by:
width
in interfaceSingleOptionInput<SpigotSingleOptionInput>
- Parameters:
width
- the width- Returns:
- the current instance for method chaining
-
label
public SpigotSingleOptionInput label(@Nullable @Nullable net.md_5.bungee.api.chat.BaseComponent label) Set the label for the input- Parameters:
label
- the label text- Returns:
- the current instance for method chaining
-
label
Description copied from interface:SingleOptionInput
Set the label for the input- Specified by:
label
in interfaceSingleOptionInput<SpigotSingleOptionInput>
- Parameters:
label
- the label text- Returns:
- the current instance for method chaining
-
option
public SpigotSingleOptionInput option(String id, net.md_5.bungee.api.chat.BaseComponent display, boolean isDefault) Add an option to the input- 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
-
option
Add an option to the input- Parameters:
id
- the identifier for the optiondisplay
- the display text for the option- Returns:
- the current instance for method chaining
-
option
Description copied from interface:SingleOptionInput
Add an option to the input- Specified by:
option
in interfaceSingleOptionInput<SpigotSingleOptionInput>
- 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
-
getDialogInput
public net.md_5.bungee.api.dialog.input.DialogInput getDialogInput()- Specified by:
getDialogInput
in classSpigotDialogInput
-