force respawn on death
This commit is contained in:
parent
e6010bdb97
commit
0a94eaf190
3 changed files with 1 additions and 0 deletions
Binary file not shown.
Binary file not shown.
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue