Class InventoryClickEvent
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.intgetSlot()Gets the clicked slot number.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EntityInstanceEvent
getInstanceMethods inherited from interface 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:
getPlayerin interfacePlayerEvent- Returns:
- the player who clicked in the inventory
-
getSlot
public int getSlot()Gets the clicked slot number.- Returns:
- the clicked slot number
-
getClickType
-
getClickedItem
-
getCursorItem
-
getInventory
Description copied from interface:InventoryEventGets the inventory that was clicked.- Specified by:
getInventoryin interfaceInventoryEvent
-