player.getWorld().dropItem(player.getLocation(), stack);
else inv.setItem(first, stack);
}
//If they aren't holding a tool, move the tool to their hand
int first = inv.first(BlockUtil.getIdFromString(Config.ToolBlock));
if (!BlockUtil.getItemString(player.getItemInHand()).equals(Config.ToolBlock) && first != -1){
ItemStack back = player.getItemInHand().clone();
player.setItemInHand(inv.getItem(first));
if (back.getAmount() == 0) inv.clear(first);
else inv.setItem(first, back);