Package org.bukkit.event.inventory
Class InventoryEvent
- java.lang.Object
-
- org.bukkit.event.Event
-
- org.bukkit.event.inventory.InventoryEvent
-
- Direct Known Subclasses:
EnchantItemEvent,InventoryCloseEvent,InventoryInteractEvent,InventoryOpenEvent,PrepareAnvilEvent,PrepareItemCraftEvent,PrepareItemEnchantEvent
public class InventoryEvent extends Event
Represents a player related inventory event
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
-
Field Summary
Fields Modifier and Type Field Description protected InventoryViewtransaction
-
Constructor Summary
Constructors Constructor Description InventoryEvent(InventoryView transaction)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HandlerListgetHandlerList()HandlerListgetHandlers()InventorygetInventory()Gets the primary Inventory involved in this transactionInventoryViewgetView()Gets the view object itselfList<HumanEntity>getViewers()Gets the list of players viewing the primary (upper) inventory involved in this event-
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
-
-
-
Field Detail
-
transaction
protected InventoryView transaction
-
-
Constructor Detail
-
InventoryEvent
public InventoryEvent(@NotNull InventoryView transaction)
-
-
Method Detail
-
getInventory
@NotNull public Inventory getInventory()
Gets the primary Inventory involved in this transaction- Returns:
- The upper inventory.
-
getViewers
@NotNull public List<HumanEntity> getViewers()
Gets the list of players viewing the primary (upper) inventory involved in this event- Returns:
- A list of people viewing.
-
getView
@NotNull public InventoryView getView()
Gets the view object itself- Returns:
- InventoryView
-
getHandlers
@NotNull public HandlerList getHandlers()
- Specified by:
getHandlersin classEvent
-
getHandlerList
@NotNull public static HandlerList getHandlerList()
-
-