Class GuiButtonData

java.lang.Object
github.nighter.smartspawner.api.gui.GuiButtonData

public class GuiButtonData extends Object
Immutable data transfer object representing a GUI button configuration. This class is part of the SmartSpawner Developer API and can be used to programmatically define GUI layouts via GuiButtonBuilder.
  • Constructor Details

  • Method Details

    • getAction

      public String getAction(String clickType)
      Gets the action for a specific click type.
      Parameters:
      clickType - the click type (e.g., "click", "left_click", "right_click")
      Returns:
      the action string, or null if not found
    • getDefaultAction

      public String getDefaultAction()
      Gets the default action (checks "click" first, then "default").
      Returns:
      the default action string, or null if not found
    • hasCondition

      public boolean hasCondition()
    • hasCooldown

      public boolean hasCooldown()
      Returns whether this button has an enabled cooldown.
    • hasClickSound

      public boolean hasClickSound()
      Returns whether this button has a configured click sound.
    • hasSuccessSound

      public boolean hasSuccessSound()
    • hasFailSound

      public boolean hasFailSound()