@Override public void close() { AnvilCloseEvent event = getPlayer() .getEngine() .getEventManager() .callEvent(new AnvilCloseEvent(block, inventory, getPlayer())); if (event.isCancelled()) { return; } for (ItemStack item : inventory) { if (item != null) { getHuman().dropItem(item); } } inventory.clear(); super.close(); }
public WindowTransactionMessage(Window window, int transaction, boolean accepted) { this(window.getId(), transaction, accepted); }