spigot 1.16.3 how to set mob max health code example
Example: spigot deal damage
player.damage(damageToDeal);
// For dealing damage to entity convert it to Damageable
if (entity instanceof Damageable) {
((Damageable) entity).damage(damageToDeal);
}