Interface DialogActionBuilder<D extends Dialog<?,?,?,?>,T extends DialogActionBuilder<D,T>>

Type Parameters:
D - the type of the base dialog
T - the type of the implementing class, allowing for method chaining
All Known Subinterfaces:
AdventureDialogActionBuilder<D,T>
All Known Implementing Classes:
PaperDialogActionBuilder, PEDialogActionBuilder, SpigotDialogActionBuilder

public interface DialogActionBuilder<D extends Dialog<?,?,?,?>,T extends DialogActionBuilder<D,T>>
Interface for building dialog actions. This interface provides methods to set various properties of a dialog action, such as label, tooltip, width, and different types of actions like copying to clipboard, running commands, and opening URLs. It is designed to be implemented by classes that build specific types of dialog actions.
  • Field Details

  • Method Details

    • label

      T label(String label)
      Set the label for the dialog action
      Parameters:
      label - the label to set
      Returns:
      the current instance of the builder for method chaining
    • tooltip

      T tooltip(@Nullable @Nullable String tooltip)
      Set the tooltip for the dialog action
      Parameters:
      tooltip - the tooltip to set, can be null
      Returns:
      the current instance of the builder for method chaining
    • width

      T width(int width)
      Set the width for the dialog action
      Parameters:
      width - the width to set
      Returns:
      the current instance of the builder for method chaining
    • copyToClipboard

      T copyToClipboard(String value)
      Set the action to be a copy-to-clipboard action
      Parameters:
      value - the value to copy to the clipboard
      Returns:
      the current instance of the builder for method chaining
    • dynamicCustom

      T dynamicCustom(String id)
      Set the action to be a dynamic custom action
      Parameters:
      id - the identifier for the dynamic custom action
      Returns:
      the current instance of the builder for method chaining
    • dynamicCustom

      T dynamicCustom(String namespace, String id)
      Set the action to be a dynamic custom action with a namespace
      Parameters:
      namespace - the namespace for the dynamic custom action
      id - the identifier for the dynamic custom action
      Returns:
      the current instance of the builder for method chaining
    • dynamicRunCommand

      T dynamicRunCommand(String template)
      Set the action to be a dynamic run command action
      Parameters:
      template - the command template to run
      Returns:
      the current instance of the builder for method chaining
    • openUrl

      T openUrl(String url)
      Set the action to be an open-URL action
      Parameters:
      url - the URL to open
      Returns:
      the current instance of the builder for method chaining
    • runCommand

      T runCommand(String command)
      Set the action to be a run command action
      Parameters:
      command - the command to run
      Returns:
      the current instance of the builder for method chaining
    • suggestCommand

      T suggestCommand(String command)
      Set the action to be a suggest command action
      Parameters:
      command - the command to suggest
      Returns:
      the current instance of the builder for method chaining
    • showDialog

      T showDialog(D dialog)
      Set the action to be a show dialog action
      Parameters:
      dialog - the dialog to show
      Returns:
      the current instance of the builder for method chaining
    • showDialog

      T showDialog(String namespace, String dialogId)
      Set the action to be a show dialog action
      Parameters:
      namespace - the namespace of the dialog
      dialogId - the identifier of the dialog to show
      Returns:
      the current instance of the builder for method chaining
    • showDialog

      T showDialog(DialogOpener dialogOpener)
      Set the action to be a show dialog action
      Parameters:
      dialogOpener - the dialog opener to use for showing the dialog
      Returns:
      the current instance of the builder for method chaining