From c239908aa34f086e0655ef4b218a9ea9846567ee Mon Sep 17 00:00:00 2001 From: Pierre Maurice Schwang Date: Sun, 21 Apr 2024 13:03:00 +0200 Subject: [PATCH] Don't heal dead players (#4407) 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));