Class Dialogs

java.lang.Object
com.github.darksoulq.abyssallib.world.dialog.Dialogs

public class Dialogs extends Object
A central factory class for instantiating various dialog types. Use this as the primary entry point for creating dialog builders.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
    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.
    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 customized DialogList builders.
    multiAction(net.kyori.adventure.text.Component title)
    Creates a builder for a multi-action grid dialog.
    multiAction(net.kyori.adventure.text.Component title, int columns)
    Creates a builder for a multi-action grid dialog with column settings.
    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.
    static Notice
    notice(net.kyori.adventure.text.Component title)
    Creates a builder for a simple notice dialog.
    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.
    serverLinks(net.kyori.adventure.text.Component title, int columns, int buttonWidth)
    Creates a builder for a server links menu.
    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.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 confirm ActionButton.
      no - The cancel ActionButton.
      Returns:
      A new Confirmation builder.
    • 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 child Dialogs to display.
      Returns:
      A new DialogList builder.
    • 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 child Dialogs.
      columns - The number of columns in the list.
      buttonWidth - The pixel width of buttons.
      Returns:
      A new DialogList builder.
    • 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 customized DialogList builders.
      Parameters:
      title - The menu title.
      dialogs - The set of child Dialogs.
      exit - An optional exit ActionButton.
      columns - Optional column count.
      buttonWidth - Optional button width.
      Returns:
      A new DialogList builder.
    • notice

      public static Notice notice(net.kyori.adventure.text.Component title)
      Creates a builder for a simple notice dialog.
      Parameters:
      title - The notice title.
      Returns:
      A new Notice builder.
    • 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 primary ActionButton.
      Returns:
      A new Notice builder.
    • 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 ServerLinks builder.
    • 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 primary ActionButton.
      columns - Number of columns.
      buttonWidth - Width of link buttons.
      Returns:
      A new ServerLinks builder.
    • multiAction

      public static MultiAction multiAction(net.kyori.adventure.text.Component title)
      Creates a builder for a multi-action grid dialog.
      Parameters:
      title - The menu title.
      Returns:
      A new MultiAction builder.
    • multiAction

      public static MultiAction multiAction(net.kyori.adventure.text.Component title, int columns)
      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 MultiAction builder.
    • 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 exit ActionButton.
      columns - Number of columns in the grid.
      Returns:
      A new MultiAction builder.