Skip to content

Commit

Permalink
Don't heal dead players (#4407)
Browse files Browse the repository at this point in the history
fix: don't heal dead players
  • Loading branch information
PierreSchwang authored Apr 21, 2024
1 parent a641258 commit c239908
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ public void startRunnable() {
iterator.remove();
continue;
}
// Don't attempt to heal dead players - they will get stuck in the abyss (#4406)
if (PlotSquared.platform().worldUtil().getHealth(player) <= 0) {
continue;
}
double level = PlotSquared.platform().worldUtil().getHealth(player);
if (level != value.max) {
PlotSquared.platform().worldUtil().setHealth(player, Math.min(level + value.amount, value.max));
Expand Down

0 comments on commit c239908

Please sign in to comment.