aboutsummaryrefslogtreecommitdiff
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
parent65f2eb0d1526e3864f05bbd811b5fbea7b197807 (diff)
downloadresurrection-3305708003b9bdaa409d0be384b9ea057891f308.tar
resurrection-3305708003b9bdaa409d0be384b9ea057891f308.tar.gz
resurrection-3305708003b9bdaa409d0be384b9ea057891f308.tar.bz2
edited readme
-rw-r--r--README.md19
-rw-r--r--src/net/brysonsteck/Resurrection/player/PlayerListener.java4
2 files changed, 21 insertions, 2 deletions
diff --git a/README.md b/README.md
index 3076a5b..070546c 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,20 @@
# Resurrection
-A Spigot Minecraft plugin that makes players wait a full day before respawning.
+Resurrection is a Spigot Minecraft Server plugin that forces players to wait a full 24 hours before rejoining the world. This allows for tactical planning for games such as faction survival and others as it can severely penalize an entire team if care is not taken.
+
+This plugin currently runs on 1.16.5 servers and worlds with 1.17.\* support expected in the future.
+
+# Commands
+
+* `/about`
+ * Displays information about the plugin, manually checks for updates.
+* `/resurrect PLAYER`
+ * An operator-only command. Manually resurrects a player if they are dead.
+* `/howlong [PLAYER]` *(Currently not implemented)*
+ * Shows the player how long they (or the specified player) have until they are resurrected.
+
+# Files
+
+This program automatically generates a 'player data' file in the same directory as the server jar. This file is important to make sure that the resurrection timing stays in effect after a server shutdown. If this file is deleted, moved or non-existent, a blank file will be created.
+
+**Please be aware that removing this file may cause the plugin to behave differently,** such as holding a player in a dead state for all of time.
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();