summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-11-28 20:24:13 +0100
committersnowleo <schneeleo@gmail.com>2011-11-28 20:24:13 +0100
commit0dae97d7f48f5e91a227232a679cc011eefb8e32 (patch)
tree7e8ed82a330a18faabb80cb94439e3297b040af0
parente3cd1404ef5de40800008ae4d0b38373d8494b5d (diff)
downloadEssentials-0dae97d7f48f5e91a227232a679cc011eefb8e32.tar
Essentials-0dae97d7f48f5e91a227232a679cc011eefb8e32.tar.gz
Essentials-0dae97d7f48f5e91a227232a679cc011eefb8e32.tar.lz
Essentials-0dae97d7f48f5e91a227232a679cc011eefb8e32.tar.xz
Essentials-0dae97d7f48f5e91a227232a679cc011eefb8e32.zip
Fix bug in /sell command
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandsell.java3
1 files changed, 2 insertions, 1 deletions
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);