From 3b57ec4e700aa394279661af9d7d1653adab7266 Mon Sep 17 00:00:00 2001 From: Pierre Maurice Schwang Date: Sat, 20 Apr 2024 16:06:00 +0200 Subject: [PATCH] fix: don't heal dead players --- .../main/java/com/plotsquared/core/listener/PlotListener.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Core/src/main/java/com/plotsquared/core/listener/PlotListener.java b/Core/src/main/java/com/plotsquared/core/listener/PlotListener.java index 759421f5e..766bf62d9 100644 --- a/Core/src/main/java/com/plotsquared/core/listener/PlotListener.java +++ b/Core/src/main/java/com/plotsquared/core/listener/PlotListener.java @@ -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));