Skip to content

Commit

Permalink
Fix "kill" action, fixes #1520
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jan 7, 2017
1 parent ca6fbab commit c290f9f
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -275,7 +275,7 @@ public void onHit(EntityDamageByEntityEvent event) {
DenizenAPI.getDenizenNPC(npc).action("hit on " + event.getEntityType().name(), player);

if (event.getEntity() instanceof LivingEntity) {
if (((LivingEntity) event.getEntity()).getHealth() - event.getDamage() <= 0) {
if (((LivingEntity) event.getEntity()).getHealth() - event.getFinalDamage() <= 0) {
DenizenAPI.getDenizenNPC(npc).action("kill", player);
DenizenAPI.getDenizenNPC(npc).action("kill of " + event.getEntityType().name(), player);
}
Expand Down

0 comments on commit c290f9f

Please sign in to comment.