Interface ActionButton.Builder

Enclosing interface:
ActionButton

@NonExtendable public static interface ActionButton.Builder
A builder for creating ActionButton instances.
Since:
1.21.7
  • Method Summary

    Modifier and Type
    Method
    Description
    action(@Nullable DialogAction action)
    Sets the action associated with this button, or null if no action is desired.
    Builds the ActionButton instance with the configured values.
    tooltip(@Nullable net.kyori.adventure.text.Component tooltip)
    Sets the tooltip of the action button, or null if no tooltip is desired.
    width(@Range(from=1L,to=1024L) int width)
    Sets the width of the action button.
  • Method Details

    • tooltip

      @Contract(value="_ -> this", mutates="this") ActionButton.Builder tooltip(@Nullable net.kyori.adventure.text.Component tooltip)
      Sets the tooltip of the action button, or null if no tooltip is desired.
      Parameters:
      tooltip - the tooltip of the button, or null
      Returns:
      this builder
      Since:
      1.21.7
    • width

      @Contract(value="_ -> this", mutates="this") ActionButton.Builder width(@Range(from=1L,to=1024L) int width)
      Sets the width of the action button.
      Parameters:
      width - the width of the button
      Returns:
      this builder
      Since:
      1.21.7
    • action

      @Contract(value="_ -> this", mutates="this") ActionButton.Builder action(@Nullable DialogAction action)
      Sets the action associated with this button, or null if no action is desired.
      Parameters:
      action - the action to perform when the button is clicked, or null
      Returns:
      this builder
      Since:
      1.21.7
    • build

      @Contract(value="-> new", pure=true) ActionButton build()
      Builds the ActionButton instance with the configured values.
      Returns:
      a new ActionButton instance
      Since:
      1.21.7