mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-02 13:31:43 +01:00
fix
This commit is contained in:
parent
816545cf59
commit
3ca49572f9
Binary file not shown.
@ -100,17 +100,15 @@ public class EquipmentEditor extends Editor {
|
|||||||
Messaging.send(player, "<e>" + npc.getName() + " <a>had all of its items removed.");
|
Messaging.send(player, "<e>" + npc.getName() + " <a>had all of its items removed.");
|
||||||
}
|
}
|
||||||
// Now edit the equipment based on the slot
|
// Now edit the equipment based on the slot
|
||||||
if (trait.get(slot) != null) {
|
if (trait.get(slot) != null && trait.get(slot).getType() != Material.AIR)
|
||||||
player.getWorld().dropItemNaturally(npc.getBukkitEntity().getLocation(), trait.get(slot));
|
player.getWorld().dropItemNaturally(npc.getBukkitEntity().getLocation(), trait.get(slot));
|
||||||
}
|
|
||||||
|
|
||||||
ItemStack set = hand;
|
ItemStack set = hand;
|
||||||
if (set != null && set.getType() != Material.AIR) {
|
if (set != null && set.getType() != Material.AIR) {
|
||||||
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);
|
set.setAmount(1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user