This commit is contained in:
fullwall 2012-02-28 20:11:37 +08:00
commit 333c4e35b4

View File

@ -102,11 +102,13 @@ public class EquipmentEditor extends Editor {
// Now edit the equipment based on the slot
if (trait.getEquipment(slot) != null && trait.getEquipment(slot).getType() != Material.AIR)
player.getWorld().dropItemNaturally(npc.getBukkitEntity().getLocation(), trait.getEquipment(slot));
trait.setEquipment(slot, hand);
ItemStack set = hand;
if (hand.getAmount() > 1)
hand.setAmount(hand.getAmount() - 1);
else
hand = null;
player.setItemInHand(hand);
set.setAmount(1);
trait.setEquipment(slot, set);
}
}