Class GuiElement.Click

java.lang.Object
de.themoep.inventorygui.GuiElement.Click
Enclosing class:
GuiElement

public static class GuiElement.Click extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    Click(InventoryGui gui, int slot, org.bukkit.event.inventory.ClickType clickType, org.bukkit.inventory.ItemStack cursor, GuiElement element, org.bukkit.event.inventory.InventoryInteractEvent event)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.inventory.ItemStack
    Get the item on the cursor
    Get the element that was clicked
     
    org.bukkit.event.inventory.InventoryInteractEvent
    Get the event of the inventory interaction
    int
    Get the slot of the GUI that was clicked
    org.bukkit.event.inventory.ClickType
    Get the type of the click
    org.bukkit.entity.HumanEntity
    Get who clicked the element
    void
    setCursor(org.bukkit.inventory.ItemStack cursor)
    Set the item on the cursor after the click

    Methods inherited from class java.lang.Object

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

    • Click

      public Click(InventoryGui gui, int slot, org.bukkit.event.inventory.ClickType clickType, org.bukkit.inventory.ItemStack cursor, GuiElement element, org.bukkit.event.inventory.InventoryInteractEvent event)
  • Method Details

    • getSlot

      public int getSlot()
      Get the slot of the GUI that was clicked
      Returns:
      The clicked slot
    • getElement

      public GuiElement getElement()
      Get the element that was clicked
      Returns:
      The clicked GuiElement
    • getType

      public org.bukkit.event.inventory.ClickType getType()
      Get the type of the click
      Returns:
      The type of the click
    • getCursor

      public org.bukkit.inventory.ItemStack getCursor()
      Get the item on the cursor
      Returns:
      The item on the cursor when this click occurred
    • setCursor

      public void setCursor(org.bukkit.inventory.ItemStack cursor)
      Set the item on the cursor after the click
      Parameters:
      cursor - The new item on the cursor
    • getWhoClicked

      public org.bukkit.entity.HumanEntity getWhoClicked()
      Get who clicked the element
      Returns:
      The player that clicked
    • getRawEvent

      public org.bukkit.event.inventory.InventoryInteractEvent getRawEvent()
      Get the event of the inventory interaction
      Returns:
      The InventoryInteractEvent associated with this Click
    • getGui

      public InventoryGui getGui()