From a227af77534486dcebf583b586c581be18ff78e7 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Wed, 21 Jul 2021 21:46:55 -0600 Subject: testing bed respawn --- src/net/brysonsteck/Resurrection/player/PlayerListener.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/net') diff --git a/src/net/brysonsteck/Resurrection/player/PlayerListener.java b/src/net/brysonsteck/Resurrection/player/PlayerListener.java index 3b23c03..2b1fc7a 100644 --- a/src/net/brysonsteck/Resurrection/player/PlayerListener.java +++ b/src/net/brysonsteck/Resurrection/player/PlayerListener.java @@ -186,6 +186,9 @@ public class PlayerListener implements Listener { p.playSound(p.getLocation(), Sound.ENTITY_ENDER_DRAGON_GROWL, 1, 0); } Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + p.getDisplayName() + " has resurrected!"); + if (p.getBedSpawnLocation() != null) { + p.teleport(p.getBedSpawnLocation()); + } } }.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), 1728000); } -- cgit v1.2.3