Interface DialogAction

All Known Subinterfaces:
DialogAction.CommandTemplateAction, DialogAction.CustomClickAction, DialogAction.StaticAction

Represents an action that can be performed in a dialog.
  • Method Details

    • commandTemplate

      @Contract(pure=true, value="_ -> new") static DialogAction.CommandTemplateAction commandTemplate(String template)
      Creates a new command template action. The template format looks for $(variable_name) to substitute variables. variable_name should correspond to a DialogInput.key().
      Parameters:
      template - the command template to execute
      Returns:
      a new command template action instance
    • staticAction

      @Contract(pure=true, value="_ -> new") static DialogAction.StaticAction staticAction(ClickEvent value)
      Creates a new static action that performs a click event.
      Parameters:
      value - the click event to perform
      Returns:
      a new static action instance
    • customClick

      @Contract(pure=true, value="_, _ -> new") static DialogAction.CustomClickAction customClick(Key id, @Nullable BinaryTagHolder additions)
      Creates a new custom click action that executes a custom action. Each DialogInput.key() is added to the compound binary tag holder.
      Parameters:
      id - the identifier of the custom action
      additions - additional data to be sent with the action, or null if not needed
      Returns:
      a new custom click action instance
    • customClick

      @Contract(pure=true, value="_, _ -> new") static DialogAction.CustomClickAction customClick(DialogActionCallback callback, ClickCallback.Options options)
      Creates a new custom click action that executes a custom action.
      Parameters:
      callback - the custom action to execute
      options - the options for the custom action
      Returns:
      a new custom click action instance