aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2021-07-21 21:42:35 -0600
committerBryson Steck <steck.bryson@gmail.com>2021-07-21 21:42:35 -0600
commit993afa8280da880646ad597739c9627fcb34d06c (patch)
tree49aafa99071f4dbefd3de86a1d8349fe371f5503
parent176eb6df74e3ce8c93e6b4944f84807363b2ad30 (diff)
downloadresurrection-993afa8280da880646ad597739c9627fcb34d06c.tar
resurrection-993afa8280da880646ad597739c9627fcb34d06c.tar.gz
resurrection-993afa8280da880646ad597739c9627fcb34d06c.tar.bz2
fixed location grabber
-rw-r--r--out/artifacts/Resurrection_jar/Resurrection.jarbin1352768 -> 1352698 bytes
-rw-r--r--src/net/brysonsteck/Resurrection/player/PlayerListener.java8
2 files changed, 4 insertions, 4 deletions
diff --git a/out/artifacts/Resurrection_jar/Resurrection.jar b/out/artifacts/Resurrection_jar/Resurrection.jar
index 4cc2436..057d7c0 100644
--- a/out/artifacts/Resurrection_jar/Resurrection.jar
+++ b/out/artifacts/Resurrection_jar/Resurrection.jar
Binary files differ
diff --git a/src/net/brysonsteck/Resurrection/player/PlayerListener.java b/src/net/brysonsteck/Resurrection/player/PlayerListener.java
index 4dc4a06..9bbc244 100644
--- a/src/net/brysonsteck/Resurrection/player/PlayerListener.java
+++ b/src/net/brysonsteck/Resurrection/player/PlayerListener.java
@@ -22,7 +22,7 @@ public class PlayerListener implements Listener {
boolean stillDead;
boolean timerRunning = false;
World world = Bukkit.getWorlds().get(0);
- Location spawn;
+ Location spawn = world.getSpawnLocation();
Hashtable<String, Location> playerSpawns = new Hashtable<>();
public PlayerListener() {
@@ -79,7 +79,7 @@ public class PlayerListener implements Listener {
playerData.saveData(rawData + ";" + p.getDisplayName() + ",false,0");
}
if (resumeDeath && !timerRunning) {
- spawn = p.getLocation();
+// spawn = p.getLocation();
p.sendMessage(ChatColor.RED + "You are still dead. To check how long you have left before you are resurrected, " +
"run \"howlong\" in chat.");
new BukkitRunnable() {
@@ -201,7 +201,7 @@ public class PlayerListener implements Listener {
new BukkitRunnable() {
@Override
public void run() {
- spawn = p.getLocation();
+// spawn = p.getLocation();
// PotionEffect invisibility = new PotionEffect(PotionEffectType.INVISIBILITY, 1728000, 10, false);
PotionEffect blindness = new PotionEffect(PotionEffectType.BLINDNESS, 999999999, 10, false);
PotionEffect slowness = new PotionEffect(PotionEffectType.SLOW, 999999999, 10, false);
@@ -217,7 +217,7 @@ public class PlayerListener implements Listener {
public void onPlayerMove(PlayerMoveEvent e) {
Player p = e.getPlayer();
if (p.getGameMode() == GameMode.SPECTATOR) {
- p.teleport(playerSpawns.get(p.getDisplayName()));
+ p.teleport(spawn);
}
}
}