Class InventoryBundleItemSelectEvent
java.lang.Object
net.minestom.server.event.inventory.InventoryBundleItemSelectEvent
- All Implemented Interfaces:
Event, EntityEvent, EntityInstanceEvent, InstanceEvent, InventoryEvent, PlayerEvent, PlayerInstanceEvent
public class InventoryBundleItemSelectEvent
extends Object
implements InventoryEvent, PlayerInstanceEvent
Called when a player selects an item from a Bundle
-
Constructor Summary
ConstructorsConstructorDescriptionInventoryBundleItemSelectEvent(Player player, AbstractInventory inventory, int slot, int selectedItemIndex) -
Method Summary
Modifier and TypeMethodDescriptionGets the inventory that was clicked.Gets the player who selected the itemintReturns the index of the selected item in the bundle.intgetSlot()Returns the modified slot, relative togetInventory()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
-
InventoryBundleItemSelectEvent
public InventoryBundleItemSelectEvent(Player player, AbstractInventory inventory, int slot, int selectedItemIndex)
-
-
Method Details
-
getPlayer
Gets the player who selected the item- Specified by:
getPlayerin interfacePlayerEvent- Returns:
- the player
-
getSlot
public int getSlot()Returns the modified slot, relative togetInventory() -
getSelectedItemIndex
public int getSelectedItemIndex()Returns the index of the selected item in the bundle. -1 if the bundle is unhovered and the current item is deselected -
getInventory
Description copied from interface:InventoryEventGets the inventory that was clicked.- Specified by:
getInventoryin interfaceInventoryEvent
-