From 0a94eaf19095615e03fb2bef1cecaa8bcc13d227 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sun, 6 Jun 2021 12:29:22 -0600 Subject: force respawn on death --- src/net/brysonsteck/Resurrection/PlayerListener.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/net/brysonsteck') diff --git a/src/net/brysonsteck/Resurrection/PlayerListener.java b/src/net/brysonsteck/Resurrection/PlayerListener.java index a12ec52..fe8f2b7 100644 --- a/src/net/brysonsteck/Resurrection/PlayerListener.java +++ b/src/net/brysonsteck/Resurrection/PlayerListener.java @@ -19,6 +19,7 @@ public class PlayerListener implements Listener { public void onDeath(PlayerDeathEvent e) { System.out.println("Resurrection: A player has died!"); Player p = e.getEntity(); + p.spigot().respawn(); p.setGameMode(GameMode.SPECTATOR); p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW,1000000000, 500)); p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 1000000000, 500)); -- cgit v1.2.3