mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-27 13:15:33 +01:00
fix duping bug
This commit is contained in:
parent
a795111e1d
commit
f6f655b15c
@ -102,7 +102,9 @@ public class EquipmentEditor extends Editor {
|
|||||||
// Now edit the equipment based on the slot
|
// Now edit the equipment based on the slot
|
||||||
if (trait.getEquipment(slot) != null && trait.getEquipment(slot).getType() != Material.AIR)
|
if (trait.getEquipment(slot) != null && trait.getEquipment(slot).getType() != Material.AIR)
|
||||||
player.getWorld().dropItemNaturally(npc.getBukkitEntity().getLocation(), trait.getEquipment(slot));
|
player.getWorld().dropItemNaturally(npc.getBukkitEntity().getLocation(), trait.getEquipment(slot));
|
||||||
trait.setEquipment(slot, hand);
|
ItemStack set = hand;
|
||||||
|
set.setAmount(1);
|
||||||
|
trait.setEquipment(slot, set);
|
||||||
if (hand.getAmount() > 1)
|
if (hand.getAmount() > 1)
|
||||||
hand.setAmount(hand.getAmount() - 1);
|
hand.setAmount(hand.getAmount() - 1);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user