Class ViaDialogListDialog
java.lang.Object
io.github.projectunified.unidialog.viaversion.dialog.ViaDialog<ViaDialogListDialog>
io.github.projectunified.unidialog.viaversion.dialog.ViaDialogListDialog
- All Implemented Interfaces:
Dialog<ViaItem,,ViaDialogBodyBuilder, ViaDialogInputBuilder, ViaDialogListDialog> DialogListDialog<ViaItem,ViaDialogBodyBuilder, ViaDialogInputBuilder, ViaDialog<?>, ViaDialogActionBuilder, ViaDialogListDialog>
public class ViaDialogListDialog
extends ViaDialog<ViaDialogListDialog>
implements DialogListDialog<ViaItem,ViaDialogBodyBuilder,ViaDialogInputBuilder,ViaDialog<?>,ViaDialogActionBuilder,ViaDialogListDialog>
A ViaVersion-based implementation of
DialogListDialog for building dialog list dialogs.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.projectunified.unidialog.core.dialog.Dialog
Dialog.AfterAction -
Field Summary
Fields inherited from interface io.github.projectunified.unidialog.core.dialog.DialogListDialog
DEFAULT_BUTTON_WIDTH, DEFAULT_COLUMNS -
Constructor Summary
ConstructorsConstructorDescriptionViaDialogListDialog(String defaultNamespace, Function<String, com.viaversion.viaversion.libs.mcstructs.text.TextComponent> componentDeserializer) Constructor for ViaDialogListDialog -
Method Summary
Modifier and TypeMethodDescriptionbuttonWidth(int buttonWidth) Set the width of the buttons in the dialogcolumns(int columns) Set the number of columns in the dialogdialog(DialogOpener dialogOpener) Add a dialog to the list of dialogs in this dialogAdd a dialog to the list of dialogs in this dialogAdd a dialog to the list of dialogs in this dialogexitAction(Consumer<ViaDialogActionBuilder> action) Set the action to be performed when exiting the dialogprotected voidwriteDialogType(com.viaversion.nbt.tag.CompoundTag tag, com.viaversion.viaversion.util.SerializerVersion baseVersion, com.viaversion.viaversion.util.SerializerVersion targetVersion) Write the type-specific fields of this dialog, including thetypekeyMethods inherited from class io.github.projectunified.unidialog.viaversion.dialog.ViaDialog
afterAction, body, canCloseWithEscape, deserialize, externalTitle, externalTitle, getActionBuilder, getDialogTag, getDialogTag, input, opener, pause, title, titleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.projectunified.unidialog.core.dialog.Dialog
afterAction, body, body, canCloseWithEscape, externalTitle, input, input, opener, pause, titleMethods inherited from interface io.github.projectunified.unidialog.core.dialog.DialogListDialog
dialog
-
Constructor Details
-
ViaDialogListDialog
public ViaDialogListDialog(String defaultNamespace, Function<String, com.viaversion.viaversion.libs.mcstructs.text.TextComponent> componentDeserializer) Constructor for ViaDialogListDialog- Parameters:
defaultNamespace- the default namespace for custom actionscomponentDeserializer- the function to deserialize components from strings
-
-
Method Details
-
dialog
Description copied from interface:DialogListDialogAdd a dialog to the list of dialogs in this dialog- Specified by:
dialogin interfaceDialogListDialog<ViaItem,ViaDialogBodyBuilder, ViaDialogInputBuilder, ViaDialog<?>, ViaDialogActionBuilder, ViaDialogListDialog> - Parameters:
dialog- the dialog to add- Returns:
- the dialog itself for method chaining
-
dialog
Description copied from interface:DialogListDialogAdd a dialog to the list of dialogs in this dialog- Specified by:
dialogin interfaceDialogListDialog<ViaItem,ViaDialogBodyBuilder, ViaDialogInputBuilder, ViaDialog<?>, ViaDialogActionBuilder, ViaDialogListDialog> - Parameters:
namespace- the namespace of the dialogdialogId- the ID of the dialog- Returns:
- the dialog itself for method chaining
-
dialog
Description copied from interface:DialogListDialogAdd a dialog to the list of dialogs in this dialog- Specified by:
dialogin interfaceDialogListDialog<ViaItem,ViaDialogBodyBuilder, ViaDialogInputBuilder, ViaDialog<?>, ViaDialogActionBuilder, ViaDialogListDialog> - Parameters:
dialogOpener- the dialog opener that will open the dialog- Returns:
- the dialog itself for method chaining
-
exitAction
Description copied from interface:DialogListDialogSet the action to be performed when exiting the dialog- Specified by:
exitActionin interfaceDialogListDialog<ViaItem,ViaDialogBodyBuilder, ViaDialogInputBuilder, ViaDialog<?>, ViaDialogActionBuilder, ViaDialogListDialog> - Parameters:
action- the action to be performed when exiting the dialog- Returns:
- the dialog itself for method chaining
-
columns
Description copied from interface:DialogListDialogSet the number of columns in the dialog- Specified by:
columnsin interfaceDialogListDialog<ViaItem,ViaDialogBodyBuilder, ViaDialogInputBuilder, ViaDialog<?>, ViaDialogActionBuilder, ViaDialogListDialog> - Parameters:
columns- the number of columns in the dialog- Returns:
- the dialog itself for method chaining
-
buttonWidth
Description copied from interface:DialogListDialogSet the width of the buttons in the dialog- Specified by:
buttonWidthin interfaceDialogListDialog<ViaItem,ViaDialogBodyBuilder, ViaDialogInputBuilder, ViaDialog<?>, ViaDialogActionBuilder, ViaDialogListDialog> - Parameters:
buttonWidth- the width of the buttons in the dialog- Returns:
- the dialog itself for method chaining
-
writeDialogType
protected void writeDialogType(com.viaversion.nbt.tag.CompoundTag tag, com.viaversion.viaversion.util.SerializerVersion baseVersion, com.viaversion.viaversion.util.SerializerVersion targetVersion) Description copied from class:ViaDialogWrite the type-specific fields of this dialog, including thetypekey- Specified by:
writeDialogTypein classViaDialog<ViaDialogListDialog>- Parameters:
tag- the tag to write intobaseVersion- the serializer of the server version the dialog is created fortargetVersion- the serializer of the version the dialog is sent to
-