Fix all removeItem()

This could fix some broken logging of selling items
This commit is contained in:
snowleo 2013-02-17 15:10:41 +01:00
parent ef063c255e
commit ce9e630072
2 changed files with 2 additions and 2 deletions

View File

@ -169,7 +169,7 @@ public class Trade
{
throw new ChargeException(_("missingItems", getItemStack().getAmount(), getItemStack().getType().toString().toLowerCase(Locale.ENGLISH).replace("_", " ")));
}
user.getInventory().removeItem(getItemStack());
user.getInventory().removeItem(getItemStack().clone());
user.updateInventory();
}
if (command != null)

View File

@ -157,7 +157,7 @@ public class Commandsell extends EssentialsCommand
// This should never happen.
throw new IllegalStateException("Trying to remove more items than are available.");
}
user.getInventory().removeItem(ris);
user.getInventory().removeItem(ris.clone());
user.updateInventory();
Trade.log("Command", "Sell", "Item", user.getName(), new Trade(ris, ess), user.getName(), new Trade(worth * amount, ess), user.getLocation(), ess);
user.giveMoney(worth * amount);