Class Dialogs
java.lang.Object
com.github.darksoulq.abyssallib.world.dialog.Dialogs
A central factory class for instantiating various dialog types.
Use this as the primary entry point for creating dialog builders.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Confirmationconfirmation(net.kyori.adventure.text.Component title, io.papermc.paper.registry.data.dialog.ActionButton yes, io.papermc.paper.registry.data.dialog.ActionButton no) Creates a builder for a binary choice confirmation dialog.static DialogListdialogList(net.kyori.adventure.text.Component title, io.papermc.paper.registry.set.RegistrySet<io.papermc.paper.dialog.Dialog> dialogs) Creates a builder for a list-based dialog menu with default layout.static DialogListdialogList(net.kyori.adventure.text.Component title, io.papermc.paper.registry.set.RegistrySet<io.papermc.paper.dialog.Dialog> dialogs, int columns, int buttonWidth) Creates a builder for a list-based dialog menu with grid settings.static DialogListdialogList(net.kyori.adventure.text.Component title, io.papermc.paper.registry.set.RegistrySet<io.papermc.paper.dialog.Dialog> dialogs, io.papermc.paper.registry.data.dialog.ActionButton exit, Integer columns, Integer buttonWidth) The master factory method for creating customizedDialogListbuilders.static MultiActionmultiAction(net.kyori.adventure.text.Component title) Creates a builder for a multi-action grid dialog.static MultiActionmultiAction(net.kyori.adventure.text.Component title, int columns) Creates a builder for a multi-action grid dialog with column settings.static MultiActionmultiAction(net.kyori.adventure.text.Component title, io.papermc.paper.registry.data.dialog.ActionButton exitButton, int columns) Creates a builder for a multi-action grid dialog with exit button and columns.static Noticenotice(net.kyori.adventure.text.Component title) Creates a builder for a simple notice dialog.static Noticenotice(net.kyori.adventure.text.Component title, io.papermc.paper.registry.data.dialog.ActionButton action) Creates a builder for a notice dialog with a specific action button.static ServerLinksserverLinks(net.kyori.adventure.text.Component title, int columns, int buttonWidth) Creates a builder for a server links menu.static ServerLinksserverLinks(net.kyori.adventure.text.Component title, io.papermc.paper.registry.data.dialog.ActionButton action, int columns, int buttonWidth) Creates a builder for a server links menu with a primary action button.
-
Constructor Details
-
Dialogs
public Dialogs()
-
-
Method Details
-
confirmation
public static Confirmation confirmation(net.kyori.adventure.text.Component title, io.papermc.paper.registry.data.dialog.ActionButton yes, io.papermc.paper.registry.data.dialog.ActionButton no) Creates a builder for a binary choice confirmation dialog.- Parameters:
title- The dialog title.yes- The confirmActionButton.no- The cancelActionButton.- Returns:
- A new
Confirmationbuilder.
-
dialogList
public static DialogList dialogList(net.kyori.adventure.text.Component title, io.papermc.paper.registry.set.RegistrySet<io.papermc.paper.dialog.Dialog> dialogs) Creates a builder for a list-based dialog menu with default layout.- Parameters:
title- The menu title.dialogs- The set of childDialogs to display.- Returns:
- A new
DialogListbuilder.
-
dialogList
public static DialogList dialogList(net.kyori.adventure.text.Component title, io.papermc.paper.registry.set.RegistrySet<io.papermc.paper.dialog.Dialog> dialogs, int columns, int buttonWidth) Creates a builder for a list-based dialog menu with grid settings.- Parameters:
title- The menu title.dialogs- The set of childDialogs.columns- The number of columns in the list.buttonWidth- The pixel width of buttons.- Returns:
- A new
DialogListbuilder.
-
dialogList
public static DialogList dialogList(net.kyori.adventure.text.Component title, io.papermc.paper.registry.set.RegistrySet<io.papermc.paper.dialog.Dialog> dialogs, io.papermc.paper.registry.data.dialog.ActionButton exit, Integer columns, Integer buttonWidth) The master factory method for creating customizedDialogListbuilders.- Parameters:
title- The menu title.dialogs- The set of childDialogs.exit- An optional exitActionButton.columns- Optional column count.buttonWidth- Optional button width.- Returns:
- A new
DialogListbuilder.
-
notice
-
notice
public static Notice notice(net.kyori.adventure.text.Component title, io.papermc.paper.registry.data.dialog.ActionButton action) Creates a builder for a notice dialog with a specific action button.- Parameters:
title- The notice title.action- The primaryActionButton.- Returns:
- A new
Noticebuilder.
-
serverLinks
public static ServerLinks serverLinks(net.kyori.adventure.text.Component title, int columns, int buttonWidth) Creates a builder for a server links menu.- Parameters:
title- The menu title.columns- Number of columns.buttonWidth- Width of link buttons.- Returns:
- A new
ServerLinksbuilder.
-
serverLinks
public static ServerLinks serverLinks(net.kyori.adventure.text.Component title, io.papermc.paper.registry.data.dialog.ActionButton action, int columns, int buttonWidth) Creates a builder for a server links menu with a primary action button.- Parameters:
title- The menu title.action- The primaryActionButton.columns- Number of columns.buttonWidth- Width of link buttons.- Returns:
- A new
ServerLinksbuilder.
-
multiAction
Creates a builder for a multi-action grid dialog.- Parameters:
title- The menu title.- Returns:
- A new
MultiActionbuilder.
-
multiAction
Creates a builder for a multi-action grid dialog with column settings.- Parameters:
title- The menu title.columns- Number of columns in the grid.- Returns:
- A new
MultiActionbuilder.
-
multiAction
public static MultiAction multiAction(net.kyori.adventure.text.Component title, io.papermc.paper.registry.data.dialog.ActionButton exitButton, int columns) Creates a builder for a multi-action grid dialog with exit button and columns.- Parameters:
title- The menu title.exitButton- The designated exitActionButton.columns- Number of columns in the grid.- Returns:
- A new
MultiActionbuilder.
-