fix: don't heal dead players

This commit is contained in:
Pierre Maurice Schwang 2024-04-20 16:06:00 +02:00
parent a6412581a6
commit 3b57ec4e70
No known key found for this signature in database
GPG Key ID: 37E613079F3E5BB9
1 changed files with 4 additions and 0 deletions

View File

@ -106,6 +106,10 @@ public class PlotListener {
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));