mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 10:36:10 +01:00
Fix logic error in entity equip
This commit is contained in:
parent
a9105c624e
commit
172c46f766
@ -90,8 +90,9 @@ public class CitizensHumanNPC extends CitizensNPC implements Equipable {
|
||||
// Now edit the equipment based on the slot
|
||||
if (type != Material.AIR) {
|
||||
// Set the proper slot with one of the item
|
||||
hand.setAmount(1);
|
||||
trait.set(slot, hand);
|
||||
ItemStack clone = hand.clone();
|
||||
clone.setAmount(1);
|
||||
trait.set(slot, clone);
|
||||
|
||||
if (hand.getAmount() > 1)
|
||||
hand.setAmount(hand.getAmount() - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user