aboutsummaryrefslogtreecommitdiff
path: root/src/net/brysonsteck
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2021-06-20 22:17:41 -0600
committerBryson Steck <steck.bryson@gmail.com>2021-06-20 22:17:41 -0600
commit3305708003b9bdaa409d0be384b9ea057891f308 (patch)
tree273ef781ddf71cd3820b99b6a4b181f1da239c57 /src/net/brysonsteck
parent65f2eb0d1526e3864f05bbd811b5fbea7b197807 (diff)
downloadresurrection-3305708003b9bdaa409d0be384b9ea057891f308.tar
resurrection-3305708003b9bdaa409d0be384b9ea057891f308.tar.gz
resurrection-3305708003b9bdaa409d0be384b9ea057891f308.tar.bz2
edited readme
Diffstat (limited to 'src/net/brysonsteck')
-rw-r--r--src/net/brysonsteck/Resurrection/player/PlayerListener.java4
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();