Fix Enchant sign, the user has to hold the item in hand now. A * or "any" in the second line allows to enchant all possible items.

This commit is contained in:
snowleo 2011-12-07 14:23:56 +01:00
parent 766f0a9f13
commit 435219bab6
5 changed files with 49 additions and 32 deletions

View file

@ -156,7 +156,7 @@ public class Commandsell extends EssentialsCommand
//TODO: Prices for Enchantments
final ItemStack ris = is.clone();
ris.setAmount(amount);
InventoryWorkaround.removeItem(user.getInventory(), true, ris);
InventoryWorkaround.removeItem(user.getInventory(), true, 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);
user.giveMoney(worth * amount);