Class SimpleButtonBuilder

java.lang.Object
net.staticstudios.menus.button.SimpleButtonBuilder
All Implemented Interfaces:
Cloneable, ButtonBuilder

public class SimpleButtonBuilder extends Object implements Cloneable, ButtonBuilder
  • Constructor Details

    • SimpleButtonBuilder

      protected SimpleButtonBuilder(boolean mutable)
  • Method Details

    • name

      public SimpleButtonBuilder name(String name)
      Set the name of the button
      Parameters:
      name - the name
      Returns:
      the builder
    • name

      public SimpleButtonBuilder name(net.kyori.adventure.text.Component name)
      Set the name of the button
      Parameters:
      name - the name
      Returns:
      the builder
    • description

      public SimpleButtonBuilder description(String... description)
      Set the description of the button
      Parameters:
      description - the description
      Returns:
      the builder
    • description

      public SimpleButtonBuilder description(List<String> description)
      Set the description of the button
      Parameters:
      description - the description
      Returns:
      the builder
    • description

      public SimpleButtonBuilder description(String description)
      Set the description of the button
      Parameters:
      description - the description
      Returns:
      the builder
    • material

      public SimpleButtonBuilder material(org.bukkit.Material material)
      Set the material of the button
      Parameters:
      material - the material
      Returns:
      the builder
    • amount

      public SimpleButtonBuilder amount(int amount)
      Set the amount of the button
      Parameters:
      amount - the amount
      Returns:
      the builder
    • enchanted

      public SimpleButtonBuilder enchanted(boolean enchanted)
      Set if the button should be enchanted
      Parameters:
      enchanted - if the button should be enchanted
      Returns:
      the builder
    • onLeftClick

      public SimpleButtonBuilder onLeftClick(ButtonAction action)
      Add an action to run when the button is left-clicked
      Parameters:
      action - the action
      Returns:
      the builder
    • onRightClick

      public SimpleButtonBuilder onRightClick(ButtonAction action)
      Add an action to run when the button is right-clicked
      Parameters:
      action - the action
      Returns:
      the builder
    • onClick

      public SimpleButtonBuilder onClick(ButtonAction action)
      Add an action to run when the button is clicked
      Parameters:
      action - the action
      Returns:
      the builder
    • build

      public Button build()
      Description copied from interface: ButtonBuilder
      Build the button
      Specified by:
      build in interface ButtonBuilder
      Returns:
      The button
    • clone

      public SimpleButtonBuilder clone()
      Overrides:
      clone in class Object