Skip to content

Commit

Permalink
Potential fix for #28 incorrectly logging deaths
Browse files Browse the repository at this point in the history
  • Loading branch information
danjono committed Jul 23, 2020
1 parent 1ec980e commit 1d35c70
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private void playerDeath(EntityDamageEvent e) {

Player player = (Player) e.getEntity();

if (player.getHealth() - e.getDamage() <= 0 && player.hasPermission("inventoryrollback.deathsave")) {
if (player.getHealth() - e.getFinalDamage() <= 0 && player.hasPermission("inventoryrollback.deathsave")) {
new SaveInventory(player, LogType.DEATH, e.getCause(), player.getInventory(), player.getEnderChest()).createSave();
}
}
Expand Down

0 comments on commit 1d35c70

Please sign in to comment.