Package net.minestom.server.dialog
Interface Dialog
- All Superinterfaces:
DialogLike
,Holder<Dialog>
,Holder.Direct<Dialog>
- All Known Implementing Classes:
Dialog.Confirmation
,Dialog.DialogList
,Dialog.MultiAction
,Dialog.Notice
,Dialog.ServerLinks
public sealed interface Dialog
extends Holder.Direct<Dialog>, DialogLike
permits Dialog.Notice, Dialog.ServerLinks, Dialog.DialogList, Dialog.MultiAction, Dialog.Confirmation
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final record
static final record
static final record
static final record
static final record
Nested classes/interfaces inherited from interface net.minestom.server.registry.Holder
Holder.Direct<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NetworkBuffer.Type
<Holder<Dialog>> static final @NotNull Registry
<StructCodec<? extends Dialog>> static final NetworkBuffer.Type
<Dialog> -
Method Summary
Modifier and TypeMethodDescription@NotNull StructCodec
<? extends Dialog> codec()
static @NotNull DynamicRegistry
<Dialog> createDefaultRegistry
(@NotNull Registries registries) Creates a new registry for dialogs, loading the vanilla dialogs.static @NotNull DialogLike
forKey
(@NotNull RegistryKey<Dialog> key) Creates a new adventureDialogLike
for the dialog at the given key.@NotNull DialogMetadata
metadata()
unwrap
(@NotNull DialogLike dialog) static @NotNull DialogLike
-
Field Details
-
REGISTRY
-
REGISTRY_CODEC
-
REGISTRY_NETWORK_TYPE
-
NETWORK_TYPE
-
CODEC
-
-
Method Details
-
forKey
Creates a new adventure
DialogLike
for the dialog at the given key.Useful for sending a dialog which has been pre-sent to the client in the Dialog registry.
- Parameters:
key
- the key of the dialog (must be registered)- Returns:
- a new
DialogLike
for the dialog at the given key
-
wrap
-
unwrap
-
createDefaultRegistry
@Internal @NotNull static @NotNull DynamicRegistry<Dialog> createDefaultRegistry(@NotNull @NotNull Registries registries) Creates a new registry for dialogs, loading the vanilla dialogs.
- See Also:
-
metadata
-
codec
-