From f84afebf125128be40772884824e43952d1415e6 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sun, 6 Jun 2021 18:02:59 -0600 Subject: does delay fix the problem --- .../net/brysonsteck/Resurrection/PlayerListener.class | Bin 3031 -> 3278 bytes src/net/brysonsteck/Resurrection/PlayerListener.java | 5 +++++ 2 files changed, 5 insertions(+) diff --git a/out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class b/out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class index 17841e0..4e4edac 100644 Binary files a/out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class and b/out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class differ diff --git a/src/net/brysonsteck/Resurrection/PlayerListener.java b/src/net/brysonsteck/Resurrection/PlayerListener.java index b94e83d..039f723 100644 --- a/src/net/brysonsteck/Resurrection/PlayerListener.java +++ b/src/net/brysonsteck/Resurrection/PlayerListener.java @@ -33,6 +33,11 @@ public class PlayerListener implements Listener { public void onPlayerRespawn(PlayerRespawnEvent e) { Player p = e.getPlayer(); 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.BLINDNESS, 1728000, 10, false)); p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 1728000, 10, false)); -- cgit v1.2.3