From 12cf3aa0604bce6f72366eecddaebdbaa2a6a16e Mon Sep 17 00:00:00 2001 From: Pietro T <17928339+BRA1L0R@users.noreply.github.com> Date: Wed, 31 Mar 2021 20:47:34 +0200 Subject: [PATCH] Fix #2018. using player's health value instead of isDead (which is unreliable) (#2302) --- src/main/java/fr/xephi/authme/settings/SpawnLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/settings/SpawnLoader.java b/src/main/java/fr/xephi/authme/settings/SpawnLoader.java index 7b3fc138..2103f9bd 100644 --- a/src/main/java/fr/xephi/authme/settings/SpawnLoader.java +++ b/src/main/java/fr/xephi/authme/settings/SpawnLoader.java @@ -273,7 +273,7 @@ public class SpawnLoader implements Reloadable { * @return location of the given player if alive, spawn location if dead. */ public Location getPlayerLocationOrSpawn(Player player) { - if (player.isOnline() && player.isDead()) { + if (player.getHealth() <= 0.0) { return getSpawnLocation(player); } return player.getLocation();