Class InventoryClickEvent
java.lang.Object
net.minestom.server.event.Event
net.minestom.server.event.inventory.InventoryClickEvent
public class InventoryClickEvent extends Event
Called after
InventoryPreClickEvent
, this event cannot be cancelled and items related to the click
are already moved.-
Constructor Summary
-
Method Summary
Modifier and Type Method Description ItemStack
getClickedItem()
Gets the clicked item.ClickType
getClickType()
Gets the click type.ItemStack
getCursorItem()
Gets the item in the player cursor.Inventory
getInventory()
Can be null if the clicked inventory is the player one.Player
getPlayer()
Gets the player who clicked in the inventory.int
getSlot()
Gets the clicked slot number.
-
Constructor Details
-
Method Details
-
getPlayer
Gets the player who clicked in the inventory.- Returns:
- the player who clicked in the inventory
-
getInventory
Can be null if the clicked inventory is the player one.- Returns:
- the inventory where the click happened, null if this is the player's inventory
-
getSlot
public int getSlot()Gets the clicked slot number.- Returns:
- the clicked slot number
-
getClickType
Gets the click type.- Returns:
- the click type
-
getClickedItem
Gets the clicked item.- Returns:
- the clicked item
-
getCursorItem
Gets the item in the player cursor.- Returns:
- the cursor item
-