force respawn on death

This commit is contained in:
Bryson Steck 2021-06-06 12:29:22 -06:00
parent e6010bdb97
commit 0a94eaf190
3 changed files with 1 additions and 0 deletions

View file

@ -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));