mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-27 05:05:20 +01:00
Merge branch 'master' of http://www.github.com/CitizensDev/Citizens2
This commit is contained in:
commit
96ea7fe363
@ -102,11 +102,13 @@ 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;
|
||||||
if (hand.getAmount() > 1)
|
if (hand.getAmount() > 1)
|
||||||
hand.setAmount(hand.getAmount() - 1);
|
hand.setAmount(hand.getAmount() - 1);
|
||||||
else
|
else
|
||||||
hand = null;
|
hand = null;
|
||||||
player.setItemInHand(hand);
|
player.setItemInHand(hand);
|
||||||
|
set.setAmount(1);
|
||||||
|
trait.setEquipment(slot, set);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user