From a06e712bf4178f2db3fb7de56f894ebfb6c922f8 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Tue, 15 Jun 2021 20:28:09 -0600 Subject: trying bedspawn --- src/net/brysonsteck/Resurrection/player/PlayerListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/net/brysonsteck/Resurrection/player') 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); } } } -- cgit v1.2.3