Hi i try too do a plugin to play with a friend but i can't add armor to a mob (its a special entity) i want to know if i can do it or its impossible The code of my entity : (he spawn with block break event / block place event) Code: package fr.julian.mob.mobs; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_16_R3.CraftWorld; import org.bukkit.event.Listener; import net.md_5.bungee.api.ChatColor; import net.minecraft.server.v1_16_R3.ChatComponentText; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityZombie; import net.minecraft.server.v1_16_R3.GenericAttributes; public class End_Guard extends EntityZombie implements Listener { public End_Guard(Location loc) { super(EntityTypes.ZOMBIE, ((CraftWorld) loc.getWorld()).getHandle()); this.setPosition(loc.getX(), loc.getY(), loc.getZ()); this.setCustomName(new ChatComponentText(ChatColor.DARK_RED + "" + ChatColor.BOLD + "End Guard") ); this.setCustomNameVisible(true); this.setAbsorptionHearts(100); this.getAttributeInstance(GenericAttributes.ATTACK_DAMAGE).setValue(10.0D); this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(0.75D); this.getAttributeInstance(GenericAttributes.FOLLOW_RANGE).setValue(50.0D); } } sorry for my english i use a translator
LivingEntity#getEquipment EntityEquipment#setArmorContents Or you can set each armor piece individually with other methods, see documentation. https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/EntityEquipment.html
That didn't make sense. But you should use Bukkits Zombie instead of vanilla EntityZombie because Bukkits Zombie is a LivingEntity.