Class ViaServerLinksDialog
java.lang.Object
io.github.projectunified.unidialog.viaversion.dialog.ViaDialog<ViaServerLinksDialog>
io.github.projectunified.unidialog.viaversion.dialog.ViaServerLinksDialog
- All Implemented Interfaces:
Dialog<ViaItem,,ViaDialogBodyBuilder, ViaDialogInputBuilder, ViaServerLinksDialog> ServerLinksDialog<ViaItem,ViaDialogBodyBuilder, ViaDialogInputBuilder, ViaDialog<?>, ViaDialogActionBuilder, ViaServerLinksDialog>
public class ViaServerLinksDialog
extends ViaDialog<ViaServerLinksDialog>
implements ServerLinksDialog<ViaItem,ViaDialogBodyBuilder,ViaDialogInputBuilder,ViaDialog<?>,ViaDialogActionBuilder,ViaServerLinksDialog>
A ViaVersion-based implementation of
ServerLinksDialog for building server links 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.ServerLinksDialog
DEFAULT_BUTTON_WIDTH, DEFAULT_COLUMNS -
Constructor Summary
ConstructorsConstructorDescriptionViaServerLinksDialog(String defaultNamespace, Function<String, com.viaversion.viaversion.libs.mcstructs.text.TextComponent> componentDeserializer) Constructor for ViaServerLinksDialog -
Method Summary
Modifier and TypeMethodDescriptionbuttonWidth(int buttonWidth) Set the width of the buttons in the dialogcolumns(int columns) Set the number of columns for the dialogexitAction(@Nullable Consumer<ViaDialogActionBuilder> action) Set the exit action for 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, title
-
Constructor Details
-
ViaServerLinksDialog
public ViaServerLinksDialog(String defaultNamespace, Function<String, com.viaversion.viaversion.libs.mcstructs.text.TextComponent> componentDeserializer) Constructor for ViaServerLinksDialog- Parameters:
defaultNamespace- the default namespace for custom actionscomponentDeserializer- the function to deserialize components from strings
-
-
Method Details
-
exitAction
Description copied from interface:ServerLinksDialogSet the exit action for the dialog- Specified by:
exitActionin interfaceServerLinksDialog<ViaItem,ViaDialogBodyBuilder, ViaDialogInputBuilder, ViaDialog<?>, ViaDialogActionBuilder, ViaServerLinksDialog> - Parameters:
action- the action to be performed when exiting the dialog- Returns:
- the server links dialog itself for method chaining
-
columns
Description copied from interface:ServerLinksDialogSet the number of columns for the dialog- Specified by:
columnsin interfaceServerLinksDialog<ViaItem,ViaDialogBodyBuilder, ViaDialogInputBuilder, ViaDialog<?>, ViaDialogActionBuilder, ViaServerLinksDialog> - Parameters:
columns- the number of columns to set- Returns:
- the server links dialog itself for method chaining
-
buttonWidth
Description copied from interface:ServerLinksDialogSet the width of the buttons in the dialog- Specified by:
buttonWidthin interfaceServerLinksDialog<ViaItem,ViaDialogBodyBuilder, ViaDialogInputBuilder, ViaDialog<?>, ViaDialogActionBuilder, ViaServerLinksDialog> - Parameters:
buttonWidth- the width of the buttons- Returns:
- the server links 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<ViaServerLinksDialog>- 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
-