Skip to content

Commit

Permalink
Use Damageable#damage(double) instead of `Damageable#setHealth(doub…
Browse files Browse the repository at this point in the history
…le)`

Using Float.MAX_VALUE as that is what `/minecraft:kill` uses

Fixes EssentialsX#5842
  • Loading branch information
zp4rker committed Jun 29, 2024
1 parent 3a6fdd9 commit 2287e73
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected void updatePlayer(final Server server, final CommandSource sender, fin
return;
}
ede.getEntity().setLastDamageCause(ede);
matchPlayer.setHealth(0);
matchPlayer.damage(Float.MAX_VALUE);
sender.sendTl("kill", matchPlayer.getDisplayName());
}

Expand Down

0 comments on commit 2287e73

Please sign in to comment.