return callFakeDamageEvent(attacker, target, DamageCause.ENTITY_ATTACK, new EnumMap<DamageModifier, Double>(ImmutableMap.of(DamageModifier.BASE, damage)));
}
@Deprecated
public static double callFakeDamageEvent(Entity attacker, Entity target, DamageCause damageCause, double damage) {
EntityDamageEvent damageEvent = attacker == null ? new FakeEntityDamageEvent(target, damageCause, damage) : new FakeEntityDamageByEntityEvent(attacker, target, damageCause, damage);
mcMMO.p.getServer().getPluginManager().callEvent(damageEvent);
if (damageEvent.isCancelled()) {
return 0;
}
return damageEvent.getFinalDamage();
}