mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-25 20:25:19 +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
|
// 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