//Disconnecting
if (pInv == null) {
return;
}
PlayerCraftingInventory inventory = getPlayerInventory().getCraftingGrid();
for (ItemStack item : inventory) {
if (item != null) {
getHuman().dropItem(item);
}
}
inventory.clear();
//Do not call super-close, DefaultWindow only pseudo-closes
if (!(getPlayer().getEngine() instanceof Server)) {
super.close();
}