mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-30 20:11:29 +01:00
Fix logic error in entity equip
This commit is contained in:
parent
6f77e0e6a7
commit
1eb3041b3b
@ -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