Class InventoryCloseEvent


public class InventoryCloseEvent extends InventoryEvent
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:

To invoke one of these methods, schedule a task using 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.