Package de.themoep.inventorygui
Class GuiElement.Click
java.lang.Object
de.themoep.inventorygui.GuiElement.Click
- Enclosing class:
GuiElement
-
Constructor Summary
ConstructorsConstructorDescriptionClick(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 TypeMethodDescriptionorg.bukkit.inventory.ItemStackGet the item on the cursorGet the element that was clickedgetGui()org.bukkit.event.inventory.InventoryInteractEventGet the event of the inventory interactionintgetSlot()Get the slot of the GUI that was clickedorg.bukkit.event.inventory.ClickTypegetType()Get the type of the clickorg.bukkit.entity.HumanEntityGet who clicked the elementvoidsetCursor(org.bukkit.inventory.ItemStack cursor) Set the item on the cursor after the click
-
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
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
-