Class CommandGUIButton

All Implemented Interfaces:
Sizeable

public class CommandGUIButton extends GUIButton
A GUIButton which executes a command.
  • Constructor Details

    • CommandGUIButton

      public CommandGUIButton(GUI gui, org.bukkit.inventory.ItemStack item, int cooldown, org.bukkit.Sound sound, String permission, String command)
      Creates a new CommandGUIButton
      Parameters:
      gui - The GUI
      item - The ItemStack of the Button
      command - The command to be executed
      cooldown - The cooldown of the Button. Applied to the material, not the Button alone.
      sound - The sound that is played when pressing that button
      permission - The permission required to press this button
  • Method Details

    • onClick

      public void onClick(ClickData data)
      Description copied from class: GUIButton
      Is called when the player clicks on the Button no matter how.
      Specified by:
      onClick in class GUIButton
      Parameters:
      data - The ClickData