Class Button

java.lang.Object
tsp.headdb.inventory.Button

public class Button extends Object
A button
  • Constructor Summary

    Constructors
    Constructor
    Description
    Button​(org.bukkit.inventory.ItemStack itemStack)
     
    Button​(org.bukkit.inventory.ItemStack itemStack, Consumer<org.bukkit.event.inventory.InventoryClickEvent> action)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals​(Object o)
     
    org.bukkit.inventory.ItemStack
     
    int
     
    void
    onClick​(org.bukkit.event.inventory.InventoryClickEvent event)
     
    void
    setAction​(Consumer<org.bukkit.event.inventory.InventoryClickEvent> action)
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Button

      public Button(org.bukkit.inventory.ItemStack itemStack)
      Parameters:
      itemStack - The Item
    • Button

      public Button(org.bukkit.inventory.ItemStack itemStack, Consumer<org.bukkit.event.inventory.InventoryClickEvent> action)
      Parameters:
      itemStack - The Item
      action - The action
  • Method Details

    • getItemStack

      public org.bukkit.inventory.ItemStack getItemStack()
      Returns:
      The icon
    • setAction

      public void setAction(Consumer<org.bukkit.event.inventory.InventoryClickEvent> action)
      Parameters:
      action - The new action
    • onClick

      public void onClick(org.bukkit.event.inventory.InventoryClickEvent event)
      Parameters:
      event - The event that triggered it
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object