use of org.bukkit.event.inventory.InventoryCloseEvent in project Glowstone by GlowstoneMC.
the class GlowHumanEntity method closeInventory.
@Override
public void closeInventory() {
EventFactory.getInstance().callEvent(new InventoryCloseEvent(openInventory));
if (getGameMode() != GameMode.CREATIVE) {
if (!InventoryUtil.isEmpty(getItemOnCursor())) {
drop(getItemOnCursor());
}
handleUnusedInputs();
}
setItemOnCursor(InventoryUtil.createEmptyStack());
resetInventoryView();
}
Aggregations