make damage stats accurate

This commit is contained in:
aurora 2020-08-31 09:40:19 +00:00
parent ddf7ccf22b
commit 9e680134d0
1 changed files with 3 additions and 1 deletions

View File

@ -40,7 +40,9 @@ public class BossDamageListener implements Listener {
LivingEntity livingEntity = (LivingEntity) entityBeingDamaged;
ActiveBossHolder activeBossHolder = this.bossEntityManager.getActiveBossHolder(livingEntity);
double damage = event.getDamage();
double damage = event.getFinalDamage();
if (entityBeingDamaged instanceof LivingEntity && damage > ((LivingEntity) entityBeingDamaged).getHealth())
damage = ((LivingEntity) entityBeingDamaged).getHealth();
Player player = null;
if (activeBossHolder == null && livingEntity.getCustomName() != null) {