does delay fix the problem

This commit is contained in:
Bryson Steck 2021-06-06 18:02:59 -06:00
parent 1e32b6f67e
commit f84afebf12
2 changed files with 5 additions and 0 deletions

View file

@ -33,6 +33,11 @@ public class PlayerListener implements Listener {
public void onPlayerRespawn(PlayerRespawnEvent e) { public void onPlayerRespawn(PlayerRespawnEvent e) {
Player p = e.getPlayer(); Player p = e.getPlayer();
p.setGameMode(GameMode.ADVENTURE); p.setGameMode(GameMode.ADVENTURE);
try {
Thread.sleep(1000);
} catch (InterruptedException interruptedException) {
interruptedException.printStackTrace();
}
p.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 1728000, 10, false)); p.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 1728000, 10, false));
p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 1728000, 10, false)); p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 1728000, 10, false));
p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 1728000, 10, false)); p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 1728000, 10, false));