java.lang.Object
net.minestom.server.event.inventory.InventoryClickEvent
- All Implemented Interfaces:
Event
,EntityEvent
,EntityInstanceEvent
,InstanceEvent
,InventoryEvent
,PlayerEvent
,PlayerInstanceEvent
Called after
InventoryPreClickEvent
, this event cannot be cancelled and items related to the click
are already moved.-
Constructor Summary
ConstructorsConstructorDescriptionInventoryClickEvent
(AbstractInventory inventory, Player player, int slot, ClickType clickType, ItemStack clicked, ItemStack cursor) -
Method Summary
Modifier and TypeMethodDescriptionGets the clicked item.Gets the click type.Gets the item in the player cursor.Gets the inventory that was clicked.Gets the player who clicked in the inventory.int
getSlot()
Gets the clicked slot number.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minestom.server.event.trait.EntityInstanceEvent
getInstance
Methods inherited from interface net.minestom.server.event.trait.PlayerEvent
getEntity
-
Constructor Details
-
InventoryClickEvent
public InventoryClickEvent(AbstractInventory inventory, Player player, int slot, ClickType clickType, ItemStack clicked, ItemStack cursor)
-
-
Method Details
-
getPlayer
Gets the player who clicked in the inventory.- Specified by:
getPlayer
in interfacePlayerEvent
- Returns:
- the player who clicked in the 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
-
getInventory
Description copied from interface:InventoryEvent
Gets the inventory that was clicked.- Specified by:
getInventory
in interfaceInventoryEvent
-