Compare commits
No commits in common. "ad3da034efc0a7466c725c7dd2374ff38533f3d1" and "dddb321c70ce2ac3b781e5f39eded8fb5fb1ff14" have entirely different histories.
ad3da034ef
...
dddb321c70
11 changed files with 118 additions and 180 deletions
1
.github/ISSUE_TEMPLATE/config.yml
vendored
1
.github/ISSUE_TEMPLATE/config.yml
vendored
|
@ -1 +0,0 @@
|
|||
blank_issues_enabled: false
|
|
@ -1,14 +1,10 @@
|
|||
---
|
||||
name: Provide other feedback
|
||||
about: Tell me something that isn't related to bugs or feature requests.
|
||||
about: Tell me something that isn't releated to bugs or feature requests.
|
||||
title: ''
|
||||
labels: feedback
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**What does your feedback concern?**
|
||||
This can be about the plugin itself, coding style, documentation, outreach, basically anything!
|
||||
|
||||
**What feedback do you have for me?**
|
||||
Write away!
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -6,5 +6,3 @@ lib/
|
|||
.gradle/
|
||||
.vscode/
|
||||
*.jar
|
||||
/builds
|
||||
convert-1.8.md
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Resurrection
|
||||

|
||||

|
||||
|
||||
Resurrection is a Spigot/Bukkit Minecraft Server plugin that forces players to wait a certain amount of time before rejoining the world. This allows for tactical planning for games such as faction survival and other PvP gamemodes as it can severely penalize an entire team if care is not taken.
|
||||
|
||||
|
@ -9,11 +9,11 @@ Resurrection is intended to make players wait long amounts of time between death
|
|||
|
||||
Resurrection is only confirmed to run on vanilla Spigot or Bukkit servers, meaning you built the server yourself using `BuildTools` with no extra settings, or downloaded it from official sources such as their website. Resurrection is **NOT GUARANTEED** to run on **ANY** fork of Spigot/Bukkit servers, such as Tuinity or Paper. Issues reported involving these forks may not be provided a solution unless proven that the issue still happens on vanilla versions.
|
||||
|
||||
Tested Minecraft Versions: 1.8<sup>*</sup>, 1.9, 1.10, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18
|
||||
Tested Minecraft Versions: 1.13, 1.14, 1.15, 1.16, 1.17, 1.18
|
||||
|
||||
Native Version: 1.16
|
||||
|
||||
<sup>*</sup>For Minecraft Servers version 1.8, you must download a special build of Resurrection in order for the plugin to work properly. These files are in the [releases](https://github.com/brysonsteck/resurrection/releases) as `Resurrection_mc1.8.jar` (for versions of Resurrection > 1.3).
|
||||
You can keep track of compatibility with other versions by viewing my [TODO list.](TODO.md)
|
||||
|
||||
## Commands
|
||||
|
||||
|
@ -21,8 +21,6 @@ Native Version: 1.16
|
|||
* Displays information about the plugin, including links to download, and also warns the command-runner if the plugin is outdated.
|
||||
* `/bug`
|
||||
* Displays contact information in case a bug occurs, such as links to the GitHub issues page and the Google Form.
|
||||
* `/dead`
|
||||
* Displays all the players currently awaiting resurrection and how long they have left.
|
||||
* `/howlong [PLAYER]`
|
||||
* Shows the player how long they (or the specified player) have until they are resurrected.
|
||||
* This command requires a player to be specified when ran from the console.
|
||||
|
|
|
@ -2,9 +2,9 @@ The following applies to all files in this directory with the exception of `resu
|
|||
|
||||
# Example Files
|
||||
|
||||
This directory contains sample files for you to visualize what files Resurrection writes to the file system and how they work. Resurrection creates these files in the same directory as the Spigot server `plugins` directory when the plugin is enabled for the first time or if the files do not exist.
|
||||
These files are crucial to Resurrection as they contain important timing data and resources for the plugin.
|
||||
|
||||
**The files in this directory are purely for documentation purposes, they are not compiled into the final jars since Resurrection creates these files programmatically.**
|
||||
This directory contains sample files for you to visualize what these files will/may contain. The plugin creates these files in the same directory as the Spigot server `plugins` directory.
|
||||
|
||||
Avoid touching these files while the plugin is enabled and avoid deleting or moving the files at any time after it's creation to prevent breaking the plugin.
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ public class Resurrection extends JavaPlugin implements Listener {
|
|||
PluginDescriptionFile pluginInfo = getDescription();
|
||||
getServer().getPluginManager().registerEvents(this, this);
|
||||
|
||||
boolean stop = false;
|
||||
if (pluginInfo.getVersion().contains("beta")) {
|
||||
// beta message
|
||||
log.warning("---------------------------------------------------------");
|
||||
|
@ -42,24 +41,11 @@ public class Resurrection extends JavaPlugin implements Listener {
|
|||
log.warning("");
|
||||
log.warning("This means that this plugin is early in development and not completely finished, and as a result you may experience unexpected doodads. Make sure that the plugin is up-to-date for more features and bug fixes. The plugin will now check for updates.");
|
||||
log.warning("---------------------------------------------------------");
|
||||
} else if (Bukkit.getVersion().contains("1.8")) {
|
||||
if (!pluginInfo.getDescription().toLowerCase().contains("minecraft 1.8")) {
|
||||
log.severe("---------------------------------------------------------");
|
||||
log.severe("ERROR!");
|
||||
log.severe("This version of Resurrection is not compatible with Minecraft 1.8 due to specific API calls that were changed in subsequent releases of the game. In order to use Resurrection with Minecraft 1.8, you must download the specific Jar titled \"Resurrection_1.8.jar\" listed in the latest release of Resurrection found at https://github.com/brysonsteck/resurrection/releases.");
|
||||
log.severe("Resurrection will now disable to prevent crashing.");
|
||||
log.severe("---------------------------------------------------------");
|
||||
stop = true;
|
||||
Bukkit.getPluginManager().disablePlugin(this);
|
||||
} else {
|
||||
log.info("---------------------------------------------------------");
|
||||
}
|
||||
} else {
|
||||
log.info("---------------------------------------------------------");
|
||||
|
||||
}
|
||||
|
||||
if (!stop) {
|
||||
// check for updates
|
||||
log.info("Checking for updates...");
|
||||
CheckForUpdate check = new CheckForUpdate();
|
||||
|
@ -67,7 +53,6 @@ public class Resurrection extends JavaPlugin implements Listener {
|
|||
if (check.isSuccess()) {
|
||||
String newestVersion = check.getVersion();
|
||||
String newestVersionURL = check.getVersionURL();
|
||||
String message = check.getMessage();
|
||||
if (pluginInfo.getVersion().equals(newestVersion)) {
|
||||
log.info(newestVersion + " is the latest version of Resurrection.");
|
||||
} else {
|
||||
|
@ -76,11 +61,6 @@ public class Resurrection extends JavaPlugin implements Listener {
|
|||
log.info(newestVersionURL);
|
||||
outdated = true;
|
||||
}
|
||||
if (!message.equals("\"\"")) {
|
||||
log.info("---------------------------------------------------------");
|
||||
log.warning("A message from the developer has been sent from the update server: " + message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
log.info("---------------------------------------------------------");
|
||||
|
@ -141,7 +121,6 @@ public class Resurrection extends JavaPlugin implements Listener {
|
|||
log.info("Successfully Started!");
|
||||
log.info("---------------------------------------------------------");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ public class CommandDead implements CommandExecutor {
|
|||
public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
|
||||
Logger log = JavaPlugin.getProvidingPlugin(Resurrection.class).getLogger();
|
||||
if (DEBUG) {
|
||||
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: The `/dead` command was ran by " + commandSender.getName());
|
||||
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: The `/about` command was ran by " + commandSender.getName());
|
||||
}
|
||||
|
||||
PlayerData playerData = new PlayerData();
|
||||
|
|
|
@ -3,8 +3,6 @@ package net.brysonsteck.Resurrection.player;
|
|||
import net.brysonsteck.Resurrection.startup.ParseSettings;
|
||||
import net.brysonsteck.Resurrection.Resurrection;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.bukkit.*;
|
||||
|
@ -27,7 +25,6 @@ public class PlayerListener implements Listener {
|
|||
World world = Bukkit.getWorlds().get(0);
|
||||
Location spawn = world.getSpawnLocation();
|
||||
//Hashtable<String, Location> playerSpawns = new Hashtable<>();
|
||||
Map<String, Location> playerSpawns = new HashMap<>();
|
||||
ParseSettings parseSettings;
|
||||
boolean DEBUG;
|
||||
Logger log = JavaPlugin.getProvidingPlugin(Resurrection.class).getLogger();
|
||||
|
@ -113,8 +110,7 @@ public class PlayerListener implements Listener {
|
|||
PotionEffect slowness = new PotionEffect(PotionEffectType.SLOW, 999999999, 10, false);
|
||||
blindness.apply(p);
|
||||
slowness.apply(p);
|
||||
// p.teleport(spawn);
|
||||
playerSpawns.put(p.getDisplayName(), p.getLocation());
|
||||
p.teleport(spawn);
|
||||
}
|
||||
}.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), 1);
|
||||
timeToResurrection = timeToResurrection - System.currentTimeMillis();
|
||||
|
@ -126,17 +122,11 @@ public class PlayerListener implements Listener {
|
|||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
playerData.readData();
|
||||
String rawData = playerData.getRawData();
|
||||
int index = 0;
|
||||
boolean alreadyAlive = false;
|
||||
for (String players : rawPlayers) {
|
||||
if (players.startsWith(p.getDisplayName())) {
|
||||
String[] playerSplit = players.split(",");
|
||||
if (playerSplit[1] == "false") {
|
||||
alreadyAlive = true;
|
||||
break;
|
||||
}
|
||||
playerSplit[1] = "false";
|
||||
playerSplit[2] = "0";
|
||||
|
||||
|
@ -147,7 +137,6 @@ public class PlayerListener implements Listener {
|
|||
}
|
||||
index++;
|
||||
}
|
||||
if (!alreadyAlive) {
|
||||
stillDead = false;
|
||||
for (PotionEffect effect : p.getActivePotionEffects())
|
||||
p.removePotionEffect(effect.getType());
|
||||
|
@ -155,8 +144,8 @@ public class PlayerListener implements Listener {
|
|||
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + p.getDisplayName() + " has resurrected!");
|
||||
if (p.getBedSpawnLocation() != null) {
|
||||
p.teleport(p.getBedSpawnLocation());
|
||||
// } else {
|
||||
// p.teleport(spawn);
|
||||
} else {
|
||||
p.teleport(spawn);
|
||||
}
|
||||
for(Player p : Bukkit.getOnlinePlayers()){
|
||||
// for versions > 1.8
|
||||
|
@ -165,7 +154,6 @@ public class PlayerListener implements Listener {
|
|||
//p.playSound(p.getLocation(), Sound.WITHER_DEATH, 1, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), timeToResurrection);
|
||||
|
||||
if (DEBUG) {
|
||||
|
@ -228,19 +216,11 @@ public class PlayerListener implements Listener {
|
|||
@Override
|
||||
public void run() {
|
||||
// save death to false
|
||||
PlayerData playerData2 = new PlayerData();
|
||||
playerData2.readData();
|
||||
String rawData = playerData2.getRawData();
|
||||
String rawData = playerData.getRawData();
|
||||
int index = 0;
|
||||
boolean alreadyAlive = false;
|
||||
for (String players : rawPlayers) {
|
||||
if (players.startsWith(p.getDisplayName())) {
|
||||
String[] playerSplit = players.split(",");
|
||||
log.info(playerSplit[1]);
|
||||
if (playerSplit[1] == "false") {
|
||||
alreadyAlive = true;
|
||||
break;
|
||||
}
|
||||
playerSplit[1] = "false";
|
||||
playerSplit[2] = "0";
|
||||
|
||||
|
@ -251,7 +231,6 @@ public class PlayerListener implements Listener {
|
|||
}
|
||||
index++;
|
||||
}
|
||||
if (!alreadyAlive) {
|
||||
stillDead = false;
|
||||
for (PotionEffect effect : p.getActivePotionEffects())
|
||||
p.removePotionEffect(effect.getType());
|
||||
|
@ -259,8 +238,8 @@ public class PlayerListener implements Listener {
|
|||
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + p.getDisplayName() + " has resurrected!");
|
||||
if (p.getBedSpawnLocation() != null) {
|
||||
p.teleport(p.getBedSpawnLocation());
|
||||
// } else {
|
||||
// p.teleport(spawn);
|
||||
} else {
|
||||
p.teleport(spawn);
|
||||
}
|
||||
for(Player p : Bukkit.getOnlinePlayers()){
|
||||
// for versions > 1.8
|
||||
|
@ -269,7 +248,6 @@ public class PlayerListener implements Listener {
|
|||
//p.playSound(p.getLocation(), Sound.WITHER_DEATH, 1, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), timeToResurrection);
|
||||
|
||||
if (DEBUG) {
|
||||
|
@ -285,7 +263,6 @@ public class PlayerListener implements Listener {
|
|||
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: Player " + p.getDisplayName() + " has respawned before their resurrection time");
|
||||
}
|
||||
|
||||
|
||||
TimeCheck timeCheck = new TimeCheck(Long.parseLong(parseSettings.getSetting("resurrection_time")));
|
||||
//playerSpawns.put(p.getDisplayName(), p.getLocation());
|
||||
p.setGameMode(GameMode.SPECTATOR);
|
||||
|
@ -304,8 +281,6 @@ public class PlayerListener implements Listener {
|
|||
// invisibility.apply(p);
|
||||
blindness.apply(p);
|
||||
slowness.apply(p);
|
||||
// put location in map
|
||||
playerSpawns.put(p.getDisplayName(), p.getLocation());
|
||||
}
|
||||
}.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), 1);
|
||||
}
|
||||
|
@ -314,12 +289,11 @@ public class PlayerListener implements Listener {
|
|||
@EventHandler
|
||||
public void onPlayerMove(PlayerMoveEvent e) {
|
||||
Player p = e.getPlayer();
|
||||
if (p.getGameMode() == GameMode.SPECTATOR && stillDead) {
|
||||
if (p.getGameMode() == GameMode.SPECTATOR) {
|
||||
if (DEBUG) {
|
||||
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: Player " + p.getDisplayName() + " attempted to move while in dead state, teleporting to spawn until their resurrection time");
|
||||
}
|
||||
//p.teleport(spawn);
|
||||
p.teleport(playerSpawns.get(p.getDisplayName()));
|
||||
p.teleport(spawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ public class CheckForUpdate {
|
|||
boolean success;
|
||||
String version;
|
||||
String versionURL;
|
||||
String message;
|
||||
Logger log = JavaPlugin.getProvidingPlugin(Resurrection.class).getLogger();
|
||||
|
||||
public CheckForUpdate() {
|
||||
|
@ -31,7 +30,6 @@ public class CheckForUpdate {
|
|||
version = softwareObj.get("current-release").toString();
|
||||
version = version.replace("\"", "");
|
||||
versionURL = softwareObj.get("github-release").toString();
|
||||
message = softwareObj.get("message").toString();
|
||||
success = true;
|
||||
} catch (IOException e) {
|
||||
log.warning("An error has occurred while attempting to check for updates.");
|
||||
|
@ -40,7 +38,7 @@ public class CheckForUpdate {
|
|||
}
|
||||
|
||||
public String urlReader() throws IOException {
|
||||
URL website = new URL("https://brysonsteck.xyz/updates");
|
||||
URL website = new URL("https://brysonsteck.net/updates.json");
|
||||
URLConnection connection = website.openConnection();
|
||||
BufferedReader in = new BufferedReader(
|
||||
new InputStreamReader(
|
||||
|
@ -66,8 +64,4 @@ public class CheckForUpdate {
|
|||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
main: net.brysonsteck.Resurrection.Resurrection
|
||||
name: Resurrection
|
||||
author: 'Bryson Steck'
|
||||
version: '1.3.2'
|
||||
website: https://brysonsteck.xyz/projects/Resurrection
|
||||
version: '1.3'
|
||||
website: https://brysonsteck.net/resurrection.html
|
||||
description: Makes players wait large amounts of time before respawning!
|
||||
database: false
|
||||
api-version: 1.13
|
||||
|
|
Loading…
Add table
Reference in a new issue