From 5e24584bf7455a8a7a19470c7114b0b11bea2ba2 Mon Sep 17 00:00:00 2001 From: snowleo Date: Mon, 28 Nov 2011 20:24:13 +0100 Subject: Fix bug in /sell command --- Essentials/src/com/earth2me/essentials/commands/Commandsell.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsell.java b/Essentials/src/com/earth2me/essentials/commands/Commandsell.java index 512eeabe3..07338e096 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsell.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsell.java @@ -154,7 +154,8 @@ public class Commandsell extends EssentialsCommand } //TODO: Prices for Enchantments - final ItemStack ris = new ItemStack(is.getType(), amount, is.getDurability()); + final ItemStack ris = is.clone(); + is.setAmount(amount); InventoryWorkaround.removeItem(user.getInventory(), true, ris); user.updateInventory(); Trade.log("Command", "Sell", "Item", user.getName(), new Trade(ris, ess), user.getName(), new Trade(worth * amount, ess), user.getLocation(), ess); -- cgit v1.2.3