diff options
author | Bryson Steck <steck.bryson@gmail.com> | 2021-06-20 22:17:41 -0600 |
---|---|---|
committer | Bryson Steck <steck.bryson@gmail.com> | 2021-06-20 22:17:41 -0600 |
commit | 3305708003b9bdaa409d0be384b9ea057891f308 (patch) | |
tree | 273ef781ddf71cd3820b99b6a4b181f1da239c57 /src/net/brysonsteck/Resurrection/player | |
parent | 65f2eb0d1526e3864f05bbd811b5fbea7b197807 (diff) | |
download | resurrection-3305708003b9bdaa409d0be384b9ea057891f308.tar resurrection-3305708003b9bdaa409d0be384b9ea057891f308.tar.gz resurrection-3305708003b9bdaa409d0be384b9ea057891f308.tar.bz2 |
edited readme
Diffstat (limited to 'src/net/brysonsteck/Resurrection/player')
-rw-r--r-- | src/net/brysonsteck/Resurrection/player/PlayerListener.java | 4 |
1 files changed, 3 insertions, 1 deletions
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(); |