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
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull ItemStackGets the clicked item.@NotNull ClickTypeGets the click type.@NotNull ItemStackGets the item in the player cursor.@Nullable InventoryGets the inventory.@NotNull PlayerGets the player who clicked in the inventory.intgetSlot()Gets the clicked slot number.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minestom.server.event.trait.EntityInstanceEvent
getInstanceMethods inherited from interface net.minestom.server.event.trait.PlayerEvent
getEntity
-
Constructor Details
-
InventoryClickEvent
-
-
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
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:InventoryEventGets the inventory.- Specified by:
getInventoryin interfaceInventoryEvent- Returns:
- the inventory, null if this is a player's inventory
-