mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-12-04 19:03:14 +01:00
fix: don't heal dead players
This commit is contained in:
parent
a6412581a6
commit
3b57ec4e70
@ -106,6 +106,10 @@ public class PlotListener {
|
|||||||
iterator.remove();
|
iterator.remove();
|
||||||
continue;
|
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);
|
double level = PlotSquared.platform().worldUtil().getHealth(player);
|
||||||
if (level != value.max) {
|
if (level != value.max) {
|
||||||
PlotSquared.platform().worldUtil().setHealth(player, Math.min(level + value.amount, value.max));
|
PlotSquared.platform().worldUtil().setHealth(player, Math.min(level + value.amount, value.max));
|
||||||
|
Loading…
Reference in New Issue
Block a user