From 4f0ac642fa3fdbd8ba4237013134f68af72f42a0 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Wed, 21 Jul 2021 21:52:25 -0600 Subject: delay teleport to spawn --- src/net/brysonsteck/Resurrection/player/PlayerListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net') diff --git a/src/net/brysonsteck/Resurrection/player/PlayerListener.java b/src/net/brysonsteck/Resurrection/player/PlayerListener.java index 7cc8618..d638347 100644 --- a/src/net/brysonsteck/Resurrection/player/PlayerListener.java +++ b/src/net/brysonsteck/Resurrection/player/PlayerListener.java @@ -201,7 +201,6 @@ public class PlayerListener implements Listener { p.setGameMode(GameMode.SPECTATOR); p.sendMessage(ChatColor.RED + "" + ChatColor.BOLD + "YOU HAVE DIED!!"); p.sendMessage(ChatColor.RED + "You will be able to respawn in the next 24 hours."); - p.teleport(spawn); new BukkitRunnable() { @Override public void run() { @@ -212,6 +211,7 @@ public class PlayerListener implements Listener { // invisibility.apply(p); blindness.apply(p); slowness.apply(p); + p.teleport(spawn); } }.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), 1); } -- cgit v1.2.3