aboutsummaryrefslogtreecommitdiff
path: root/src/net/brysonsteck/Resurrection
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2021-06-15 20:28:09 -0600
committerBryson Steck <steck.bryson@gmail.com>2021-06-15 20:28:09 -0600
commita06e712bf4178f2db3fb7de56f894ebfb6c922f8 (patch)
treeda7b55fef6b1bca10ea6a714d2e6269d091eb4cb /src/net/brysonsteck/Resurrection
parent55fe6d900138477d3cd63b0d36b2219761546724 (diff)
downloadresurrection-a06e712bf4178f2db3fb7de56f894ebfb6c922f8.tar
resurrection-a06e712bf4178f2db3fb7de56f894ebfb6c922f8.tar.gz
resurrection-a06e712bf4178f2db3fb7de56f894ebfb6c922f8.tar.bz2
trying bedspawn
Diffstat (limited to 'src/net/brysonsteck/Resurrection')
-rw-r--r--src/net/brysonsteck/Resurrection/player/PlayerListener.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/brysonsteck/Resurrection/player/PlayerListener.java b/src/net/brysonsteck/Resurrection/player/PlayerListener.java
index a84fa80..b23b7ae 100644
--- a/src/net/brysonsteck/Resurrection/player/PlayerListener.java
+++ b/src/net/brysonsteck/Resurrection/player/PlayerListener.java
@@ -49,7 +49,7 @@ public class PlayerListener implements Listener {
public void onPlayerRespawn(PlayerRespawnEvent e) {
final Player p = e.getPlayer();
p.setGameMode(GameMode.SPECTATOR);
- spawn = p.getLocation();
+ this.spawn = p.getBedSpawnLocation();
new BukkitRunnable() {
@Override
public void run() {
@@ -67,7 +67,7 @@ public class PlayerListener implements Listener {
public void onPlayerMove(PlayerMoveEvent e) {
Player p = e.getPlayer();
if (p.getGameMode() == GameMode.SPECTATOR) {
- p.teleport(spawn);
+ p.teleport(this.spawn);
}
}
}