This commit is contained in:
unurled 2024-04-29 22:33:56 +02:00
parent 0f49aaf119
commit 084baf10f6
Signed by: unurled
GPG key ID: FDBC9CBE1F82423F

View file

@ -131,8 +131,8 @@ public class EntityManager extends Manager {
for (int i = 0; i < amount; i++) {
Entity e = world.spawnEntity(new Location(world, x, y, z), type.getType());
if (e instanceof Mob mob) {
if (type.getItem() != null) {
mob.getEquipment().setItemInMainHand(type.getItem());
if (type.getHandItem() != null) {
mob.getEquipment().setItemInMainHand(type.getHandItem());
}
if (!type.getArmor().isEmpty()) {
mob.getEquipment().setArmorContents(type.getArmor().toArray(new ItemStack[0]));