Class ViaNoticeDialog
java.lang.Object
io.github.projectunified.unidialog.viaversion.dialog.ViaDialog<ViaNoticeDialog>
io.github.projectunified.unidialog.viaversion.dialog.ViaNoticeDialog
- All Implemented Interfaces:
Dialog<ViaItem,,ViaDialogBodyBuilder, ViaDialogInputBuilder, ViaNoticeDialog> NoticeDialog<ViaItem,ViaDialogBodyBuilder, ViaDialogInputBuilder, ViaDialog<?>, ViaDialogActionBuilder, ViaNoticeDialog>
public class ViaNoticeDialog
extends ViaDialog<ViaNoticeDialog>
implements NoticeDialog<ViaItem,ViaDialogBodyBuilder,ViaDialogInputBuilder,ViaDialog<?>,ViaDialogActionBuilder,ViaNoticeDialog>
A ViaVersion-based implementation of
NoticeDialog for building notice dialogs.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.projectunified.unidialog.core.dialog.Dialog
Dialog.AfterAction -
Constructor Summary
ConstructorsConstructorDescriptionViaNoticeDialog(String defaultNamespace, Function<String, com.viaversion.viaversion.libs.mcstructs.text.TextComponent> componentDeserializer) Constructor for ViaNoticeDialog -
Method Summary
Modifier and TypeMethodDescriptionaction(Consumer<ViaDialogActionBuilder> action) Set the action of the notice 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
-
ViaNoticeDialog
public ViaNoticeDialog(String defaultNamespace, Function<String, com.viaversion.viaversion.libs.mcstructs.text.TextComponent> componentDeserializer) Constructor for ViaNoticeDialog- Parameters:
defaultNamespace- the default namespace for custom actionscomponentDeserializer- the function to deserialize components from strings
-
-
Method Details
-
action
Description copied from interface:NoticeDialogSet the action of the notice dialog- Specified by:
actionin interfaceNoticeDialog<ViaItem,ViaDialogBodyBuilder, ViaDialogInputBuilder, ViaDialog<?>, ViaDialogActionBuilder, ViaNoticeDialog> - Parameters:
action- the action to be performed- Returns:
- the notice 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<ViaNoticeDialog>- 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
-