From 7aa5af0920d899dec4bfb71d365afd5420dbc692 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Wed, 22 Dec 2021 21:40:39 -0700 Subject: testing new check for #4 --- src/net/brysonsteck/Resurrection/player/PlayerListener.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/net/brysonsteck') diff --git a/src/net/brysonsteck/Resurrection/player/PlayerListener.java b/src/net/brysonsteck/Resurrection/player/PlayerListener.java index a930417..8f68d2f 100644 --- a/src/net/brysonsteck/Resurrection/player/PlayerListener.java +++ b/src/net/brysonsteck/Resurrection/player/PlayerListener.java @@ -57,7 +57,13 @@ public class PlayerListener implements Listener { boolean dead = Boolean.parseBoolean(playerSplit[1]); timeToResurrection = Long.parseLong(playerSplit[2]); + if (timeToResurrection < System.currentTimeMillis()) { + dead = false; + timeToResurrection = 0; + } + if (!dead) { + if (DEBUG) { Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: Player " + p.getDisplayName() + " is not dead; making sure they are in survival"); } -- cgit v1.2.3