Class PaperDialog<T extends PaperDialog<T>>
java.lang.Object
io.github.projectunified.unidialog.paper.dialog.PaperDialog<T>
- All Implemented Interfaces:
io.github.projectunified.unidialog.adventure.dialog.AdventureDialog<org.bukkit.inventory.ItemStack,,PaperDialogBodyBuilder, PaperDialogInputBuilder, T> io.github.projectunified.unidialog.adventure.support.AdventureSupport,io.github.projectunified.unidialog.core.dialog.Dialog<org.bukkit.inventory.ItemStack,PaperDialogBodyBuilder, PaperDialogInputBuilder, T>
- Direct Known Subclasses:
PaperConfirmationDialog,PaperDialogListDialog,PaperMultiActionDialog,PaperNoticeDialog,PaperServerLinksDialog
public abstract class PaperDialog<T extends PaperDialog<T>>
extends Object
implements io.github.projectunified.unidialog.adventure.dialog.AdventureDialog<org.bukkit.inventory.ItemStack,PaperDialogBodyBuilder,PaperDialogInputBuilder,T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.projectunified.unidialog.core.dialog.Dialog
io.github.projectunified.unidialog.core.dialog.Dialog.AfterAction -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPaperDialog(String defaultNamespace, Function<String, net.kyori.adventure.text.Component> componentDeserializer) -
Method Summary
Modifier and TypeMethodDescriptionafterAction(io.github.projectunified.unidialog.core.dialog.Dialog.AfterAction afterAction) body(Consumer<PaperDialogBodyBuilder> bodyBuilder) canCloseWithEscape(boolean canCloseWithEscape) externalTitle(@Nullable net.kyori.adventure.text.Component externalTitle) protected io.papermc.paper.registry.data.dialog.ActionButtongetAction(Consumer<PaperDialogActionBuilder> actionBuilder) final io.papermc.paper.dialog.DialogCreate a dialog using the provided factoryfinal Consumer<io.papermc.paper.registry.data.dialog.DialogRegistryEntry.Builder> Get the dialog builder consumer that can be used to create a dialogprotected abstract io.papermc.paper.registry.data.dialog.type.DialogTypeinput(String key, Consumer<PaperDialogInputBuilder> inputBuilder) opener()pause(boolean pause) final voidregister(String dialogId, io.papermc.paper.registry.event.RegistryComposeEvent<io.papermc.paper.dialog.Dialog, io.papermc.paper.registry.data.dialog.DialogRegistryEntry.Builder> event) Register the dialog with the default namespace and the provided dialog ID using the given event.final voidregister(String dialogId, io.papermc.paper.registry.event.WritableRegistry<io.papermc.paper.dialog.Dialog, io.papermc.paper.registry.data.dialog.DialogRegistryEntry.Builder> registry) Register the dialog with the default namespace and the provided dialog ID in the given registry.final voidregister(String namespace, String dialogId, io.papermc.paper.registry.event.RegistryComposeEvent<io.papermc.paper.dialog.Dialog, io.papermc.paper.registry.data.dialog.DialogRegistryEntry.Builder> event) Register the dialog with the default namespace and the provided dialog ID using the given event.final voidregister(String namespace, String dialogId, io.papermc.paper.registry.event.WritableRegistry<io.papermc.paper.dialog.Dialog, io.papermc.paper.registry.data.dialog.DialogRegistryEntry.Builder> registry) Register the dialog with the default namespace and the provided dialog ID in the given registry.final voidregister(net.kyori.adventure.key.Key key, io.papermc.paper.registry.event.RegistryComposeEvent<io.papermc.paper.dialog.Dialog, io.papermc.paper.registry.data.dialog.DialogRegistryEntry.Builder> event) Register the dialog with the provided key using the given event.final voidregister(net.kyori.adventure.key.Key key, io.papermc.paper.registry.event.WritableRegistry<io.papermc.paper.dialog.Dialog, io.papermc.paper.registry.data.dialog.DialogRegistryEntry.Builder> registry) Register the dialog with the provided key in the given registry.title(net.kyori.adventure.text.Component title) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.projectunified.unidialog.adventure.dialog.AdventureDialog
externalTitle, titleMethods inherited from interface io.github.projectunified.unidialog.adventure.support.AdventureSupport
deserializeMethods inherited from interface io.github.projectunified.unidialog.core.dialog.Dialog
body, input
-
Constructor Details
-
PaperDialog
-
-
Method Details
-
title
- Specified by:
titlein interfaceio.github.projectunified.unidialog.adventure.dialog.AdventureDialog<org.bukkit.inventory.ItemStack,PaperDialogBodyBuilder, PaperDialogInputBuilder, T extends PaperDialog<T>>
-
externalTitle
- Specified by:
externalTitlein interfaceio.github.projectunified.unidialog.adventure.dialog.AdventureDialog<org.bukkit.inventory.ItemStack,PaperDialogBodyBuilder, PaperDialogInputBuilder, T extends PaperDialog<T>>
-
getComponentDeserializer
- Specified by:
getComponentDeserializerin interfaceio.github.projectunified.unidialog.adventure.support.AdventureSupport
-
canCloseWithEscape
- Specified by:
canCloseWithEscapein interfaceio.github.projectunified.unidialog.core.dialog.Dialog<org.bukkit.inventory.ItemStack,PaperDialogBodyBuilder, PaperDialogInputBuilder, T extends PaperDialog<T>>
-
pause
- Specified by:
pausein interfaceio.github.projectunified.unidialog.core.dialog.Dialog<org.bukkit.inventory.ItemStack,PaperDialogBodyBuilder, PaperDialogInputBuilder, T extends PaperDialog<T>>
-
afterAction
- Specified by:
afterActionin interfaceio.github.projectunified.unidialog.core.dialog.Dialog<org.bukkit.inventory.ItemStack,PaperDialogBodyBuilder, PaperDialogInputBuilder, T extends PaperDialog<T>>
-
body
- Specified by:
bodyin interfaceio.github.projectunified.unidialog.core.dialog.Dialog<org.bukkit.inventory.ItemStack,PaperDialogBodyBuilder, PaperDialogInputBuilder, T extends PaperDialog<T>>
-
input
- Specified by:
inputin interfaceio.github.projectunified.unidialog.core.dialog.Dialog<org.bukkit.inventory.ItemStack,PaperDialogBodyBuilder, PaperDialogInputBuilder, T extends PaperDialog<T>>
-
getAction
protected io.papermc.paper.registry.data.dialog.ActionButton getAction(Consumer<PaperDialogActionBuilder> actionBuilder) -
getDialogType
protected abstract io.papermc.paper.registry.data.dialog.type.DialogType getDialogType() -
getDialogBuilder
public final Consumer<io.papermc.paper.registry.data.dialog.DialogRegistryEntry.Builder> getDialogBuilder()Get the dialog builder consumer that can be used to create a dialog- Returns:
- a consumer that accepts a DialogRegistryEntry.Builder
-
getDialog
public final io.papermc.paper.dialog.Dialog getDialog()Create a dialog using the provided factory- Returns:
- a Dialog instance created using the dialog builder
-
register
public final void register(net.kyori.adventure.key.Key key, io.papermc.paper.registry.event.WritableRegistry<io.papermc.paper.dialog.Dialog, io.papermc.paper.registry.data.dialog.DialogRegistryEntry.Builder> registry) Register the dialog with the provided key in the given registry.- Parameters:
key- the key to register the dialog underregistry- the registry to register the dialog in
-
register
public final void register(net.kyori.adventure.key.Key key, io.papermc.paper.registry.event.RegistryComposeEvent<io.papermc.paper.dialog.Dialog, io.papermc.paper.registry.data.dialog.DialogRegistryEntry.Builder> event) Register the dialog with the provided key using the given event.- Parameters:
key- the key to register the dialog underevent- the registry compose event to register the dialog in
-
register
public final void register(String namespace, String dialogId, io.papermc.paper.registry.event.WritableRegistry<io.papermc.paper.dialog.Dialog, io.papermc.paper.registry.data.dialog.DialogRegistryEntry.Builder> registry) Register the dialog with the default namespace and the provided dialog ID in the given registry.- Parameters:
namespace- the namespace to usedialogId- the dialog ID to register underregistry- the registry to register the dialog in
-
register
public final void register(String namespace, String dialogId, io.papermc.paper.registry.event.RegistryComposeEvent<io.papermc.paper.dialog.Dialog, io.papermc.paper.registry.data.dialog.DialogRegistryEntry.Builder> event) Register the dialog with the default namespace and the provided dialog ID using the given event.- Parameters:
namespace- the namespace to usedialogId- the dialog ID to register underevent- the registry compose event to register the dialog in
-
register
public final void register(String dialogId, io.papermc.paper.registry.event.WritableRegistry<io.papermc.paper.dialog.Dialog, io.papermc.paper.registry.data.dialog.DialogRegistryEntry.Builder> registry) Register the dialog with the default namespace and the provided dialog ID in the given registry.- Parameters:
dialogId- the dialog ID to register underregistry- the registry to register the dialog in
-
register
public final void register(String dialogId, io.papermc.paper.registry.event.RegistryComposeEvent<io.papermc.paper.dialog.Dialog, io.papermc.paper.registry.data.dialog.DialogRegistryEntry.Builder> event) Register the dialog with the default namespace and the provided dialog ID using the given event.- Parameters:
dialogId- the dialog ID to register underevent- the registry compose event to register the dialog in
-
opener
- Specified by:
openerin interfaceio.github.projectunified.unidialog.core.dialog.Dialog<org.bukkit.inventory.ItemStack,PaperDialogBodyBuilder, PaperDialogInputBuilder, T extends PaperDialog<T>>
-