Package org.bukkit.event.inventory
Class InventoryCloseEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.inventory.InventoryEvent
org.bukkit.event.inventory.InventoryCloseEvent
This event is called when a player closes an inventory.
 
Because InventoryCloseEvent occurs within a modification of the Inventory, not all Inventory related methods are safe to use.
Methods that change the view a player is looking at should never be invoked by an EventHandler for InventoryCloseEvent using the HumanEntity or InventoryView associated with this event. Examples of these include:
- HumanEntity.closeInventory()
- HumanEntity.openInventory(org.bukkit.inventory.Inventory)
- HumanEntity.openWorkbench(org.bukkit.Location, boolean)
- HumanEntity.openEnchanting(org.bukkit.Location, boolean)
- InventoryView.close()
BukkitScheduler.runTask(org.bukkit.plugin.Plugin, Runnable), which will run the task
 on the next tick. Also be aware that this is not an exhaustive list, and
 other methods could potentially create issues as well.- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.inventory.InventoryEventtransaction
- 
Constructor SummaryConstructorsConstructorDescriptionInventoryCloseEvent(@NotNull InventoryView transaction) InventoryCloseEvent(@NotNull InventoryView transaction, @NotNull InventoryCloseEvent.Reason reason) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic @NotNull HandlerListfinal @NotNull HumanEntityReturns the player involved in this eventMethods inherited from class org.bukkit.event.inventory.InventoryEventgetInventory, getView, getViewersMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
InventoryCloseEvent
- 
InventoryCloseEventpublic InventoryCloseEvent(@NotNull @NotNull InventoryView transaction, @NotNull @NotNull InventoryCloseEvent.Reason reason) 
 
- 
- 
Method Details- 
getReason
- 
getPlayerReturns the player involved in this event- Returns:
- Player who is involved in this event
 
- 
getHandlers- Overrides:
- getHandlersin class- InventoryEvent
 
- 
getHandlerList
 
-