Don't heal dead players (#4407)

fix: don't heal dead players
This commit is contained in:
Pierre Maurice Schwang 2024-04-21 13:03:00 +02:00 committed by GitHub
parent a6412581a6
commit c239908aa3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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));