This commit is contained in:
fullwall 2012-10-08 22:07:29 +08:00
parent f83498e5cb
commit f6d0db7bdf

View File

@ -44,10 +44,10 @@ public class CitizensEndermanNPC extends CitizensMobNPC implements Equipable {
getBukkitEntity().setCarriedMaterial(hand.getData()); getBukkitEntity().setCarriedMaterial(hand.getData());
} }
ItemStack set = hand; ItemStack set = hand.clone();
if (set.getType() != Material.AIR) { if (set.getType() != Material.AIR) {
hand.setAmount(hand.getAmount() - 1);
set.setAmount(1); set.setAmount(1);
hand.setAmount(hand.getAmount() - 1);
} }
getTrait(Equipment.class).set(0, set); getTrait(Equipment.class).set(0, set);
} }