edited readme

This commit is contained in:
Bryson Steck 2021-06-20 22:17:41 -06:00
parent 65f2eb0d15
commit 3305708003
2 changed files with 21 additions and 2 deletions

View file

@ -1,3 +1,20 @@
# Resurrection # 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.

View file

@ -17,6 +17,7 @@ import org.bukkit.scheduler.BukkitRunnable;
public class PlayerListener implements Listener { public class PlayerListener implements Listener {
boolean stillDead; boolean stillDead;
boolean timerRunning = false;
Location spawn; Location spawn;
@EventHandler @EventHandler
@ -56,7 +57,7 @@ public class PlayerListener implements Listener {
if (!found) { if (!found) {
playerData.saveData(rawData + ";" + p.getDisplayName() + ",false,0"); playerData.saveData(rawData + ";" + p.getDisplayName() + ",false,0");
} }
if (resumeDeath) { if (resumeDeath && !timerRunning) {
spawn = p.getLocation(); spawn = p.getLocation();
new BukkitRunnable() { new BukkitRunnable() {
@Override @Override
@ -105,6 +106,7 @@ public class PlayerListener implements Listener {
long resurrectionTime = System.currentTimeMillis() + 86400000; long resurrectionTime = System.currentTimeMillis() + 86400000;
p.sendMessage("You have died!! You will be able to respawn in the next 24 hours."); p.sendMessage("You have died!! You will be able to respawn in the next 24 hours.");
timerRunning = true;
// save death state // save death state
PlayerData playerData = new PlayerData(); PlayerData playerData = new PlayerData();