mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-11 18:02:06 +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
|
// Now edit the equipment based on the slot
|
||||||
if (type != Material.AIR) {
|
if (type != Material.AIR) {
|
||||||
// Set the proper slot with one of the item
|
// Set the proper slot with one of the item
|
||||||
hand.setAmount(1);
|
ItemStack clone = hand.clone();
|
||||||
trait.set(slot, hand);
|
clone.setAmount(1);
|
||||||
|
trait.set(slot, clone);
|
||||||
|
|
||||||
if (hand.getAmount() > 1)
|
if (hand.getAmount() > 1)
|
||||||
hand.setAmount(hand.getAmount() - 1);
|
hand.setAmount(hand.getAmount() - 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user