From 3305708003b9bdaa409d0be384b9ea057891f308 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sun, 20 Jun 2021 22:17:41 -0600 Subject: edited readme --- src/net/brysonsteck/Resurrection/player/PlayerListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/net/brysonsteck/Resurrection/player') diff --git a/src/net/brysonsteck/Resurrection/player/PlayerListener.java b/src/net/brysonsteck/Resurrection/player/PlayerListener.java index 6ce72e0..0badf52 100644 --- a/src/net/brysonsteck/Resurrection/player/PlayerListener.java +++ b/src/net/brysonsteck/Resurrection/player/PlayerListener.java @@ -17,6 +17,7 @@ import org.bukkit.scheduler.BukkitRunnable; public class PlayerListener implements Listener { boolean stillDead; + boolean timerRunning = false; Location spawn; @EventHandler @@ -56,7 +57,7 @@ public class PlayerListener implements Listener { if (!found) { playerData.saveData(rawData + ";" + p.getDisplayName() + ",false,0"); } - if (resumeDeath) { + if (resumeDeath && !timerRunning) { spawn = p.getLocation(); new BukkitRunnable() { @Override @@ -105,6 +106,7 @@ public class PlayerListener implements Listener { long resurrectionTime = System.currentTimeMillis() + 86400000; p.sendMessage("You have died!! You will be able to respawn in the next 24 hours."); + timerRunning = true; // save death state PlayerData playerData = new PlayerData(); -- cgit v1.2.3