aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2021-06-15 18:49:36 -0600
committerBryson Steck <steck.bryson@gmail.com>2021-06-15 18:49:36 -0600
commitd11e749ea0351948a50e4b11673165dee719e387 (patch)
tree7978a039377acd6d3cea162833515466396cc3ac
parentfed65b2a8cf4fdf78a005be415aef87b99a31f67 (diff)
downloadresurrection-d11e749ea0351948a50e4b11673165dee719e387.tar
resurrection-d11e749ea0351948a50e4b11673165dee719e387.tar.gz
resurrection-d11e749ea0351948a50e4b11673165dee719e387.tar.bz2
shortened death time to test resurrection
-rw-r--r--out/artifacts/Resurrection_jar/Resurrection.jarbin1338355 -> 1338433 bytes
-rw-r--r--out/production/Resurrection/net/brysonsteck/Resurrection/commands/CommandResurrect.classbin3056 -> 3034 bytes
-rw-r--r--out/production/Resurrection/net/brysonsteck/Resurrection/player/PlayerListener.classbin3930 -> 3939 bytes
-rw-r--r--out/production/Resurrection/net/brysonsteck/Resurrection/startup/CheckForUpdate.classbin2478 -> 2700 bytes
-rw-r--r--src/net/brysonsteck/Resurrection/commands/CommandResurrect.java2
-rw-r--r--src/net/brysonsteck/Resurrection/player/PlayerListener.java2
-rw-r--r--src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java4
7 files changed, 5 insertions, 3 deletions
diff --git a/out/artifacts/Resurrection_jar/Resurrection.jar b/out/artifacts/Resurrection_jar/Resurrection.jar
index 19b225b..efbcf5b 100644
--- a/out/artifacts/Resurrection_jar/Resurrection.jar
+++ b/out/artifacts/Resurrection_jar/Resurrection.jar
Binary files differ
diff --git a/out/production/Resurrection/net/brysonsteck/Resurrection/commands/CommandResurrect.class b/out/production/Resurrection/net/brysonsteck/Resurrection/commands/CommandResurrect.class
index c22d073..6c06b2b 100644
--- a/out/production/Resurrection/net/brysonsteck/Resurrection/commands/CommandResurrect.class
+++ b/out/production/Resurrection/net/brysonsteck/Resurrection/commands/CommandResurrect.class
Binary files differ
diff --git a/out/production/Resurrection/net/brysonsteck/Resurrection/player/PlayerListener.class b/out/production/Resurrection/net/brysonsteck/Resurrection/player/PlayerListener.class
index 9320728..b1e801e 100644
--- a/out/production/Resurrection/net/brysonsteck/Resurrection/player/PlayerListener.class
+++ b/out/production/Resurrection/net/brysonsteck/Resurrection/player/PlayerListener.class
Binary files differ
diff --git a/out/production/Resurrection/net/brysonsteck/Resurrection/startup/CheckForUpdate.class b/out/production/Resurrection/net/brysonsteck/Resurrection/startup/CheckForUpdate.class
index 2e26831..8434267 100644
--- a/out/production/Resurrection/net/brysonsteck/Resurrection/startup/CheckForUpdate.class
+++ b/out/production/Resurrection/net/brysonsteck/Resurrection/startup/CheckForUpdate.class
Binary files differ
diff --git a/src/net/brysonsteck/Resurrection/commands/CommandResurrect.java b/src/net/brysonsteck/Resurrection/commands/CommandResurrect.java
index f05de5d..a969687 100644
--- a/src/net/brysonsteck/Resurrection/commands/CommandResurrect.java
+++ b/src/net/brysonsteck/Resurrection/commands/CommandResurrect.java
@@ -22,7 +22,7 @@ public class CommandResurrect implements CommandExecutor {
p.sendMessage("That player does not exist! Failed to resurrect.");
return false;
}
- if (resurrectPlayer.getGameMode() == GameMode.ADVENTURE) {
+ if (resurrectPlayer.getGameMode() == GameMode.SPECTATOR) {
for (PotionEffect effect : resurrectPlayer.getActivePotionEffects())
resurrectPlayer.removePotionEffect(effect.getType());
resurrectPlayer.setGameMode(GameMode.SURVIVAL);
diff --git a/src/net/brysonsteck/Resurrection/player/PlayerListener.java b/src/net/brysonsteck/Resurrection/player/PlayerListener.java
index bec8abb..8bc299f 100644
--- a/src/net/brysonsteck/Resurrection/player/PlayerListener.java
+++ b/src/net/brysonsteck/Resurrection/player/PlayerListener.java
@@ -36,7 +36,7 @@ public class PlayerListener implements Listener {
new Thread (() -> {
try {
- Thread.sleep(86400000);
+ Thread.sleep(5000);
} catch (InterruptedException interruptedException) {
interruptedException.printStackTrace();
p.sendMessage("Failed to make the thread sleep!");
diff --git a/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java b/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java
index be30844..56893d8 100644
--- a/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java
+++ b/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java
@@ -20,9 +20,11 @@ public class CheckForUpdate {
String json = urlReader();
JsonElement root = new JsonParser().parse(json);
JsonObject rootobj = root.getAsJsonObject();
- JsonElement softwareElement = rootobj.get("resurrection");
+ JsonElement softwareElement = rootobj.getAsJsonObject("resurrection");
JsonObject softwareObj = softwareElement.getAsJsonObject();
version = softwareObj.get("current-release").toString();
+ version = version.replace("\"", "");
+ versionURL = softwareObj.get("github-release").toString();
// version = rootobj.get("current-version").getAsString();
// versionURL = rootobj.get("release-url").getAsString();
} catch (IOException e) {