From 357ef1da6c37080343d40bfcbb1675b62ab32494 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sun, 6 Jun 2021 18:50:47 -0600 Subject: trying initializing first --- src/net/brysonsteck/Resurrection/PlayerListener.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/net') diff --git a/src/net/brysonsteck/Resurrection/PlayerListener.java b/src/net/brysonsteck/Resurrection/PlayerListener.java index 0aa1bdd..c48f303 100644 --- a/src/net/brysonsteck/Resurrection/PlayerListener.java +++ b/src/net/brysonsteck/Resurrection/PlayerListener.java @@ -34,9 +34,12 @@ public class PlayerListener implements Listener { Player p = e.getPlayer(); p.setGameMode(GameMode.ADVENTURE); - p.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 200, 10, false)); - p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 200, 10, false)); - p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 200, 10, false)); + PotionEffect invisibility = new PotionEffect(PotionEffectType.INVISIBILITY, 200, 10, false); + PotionEffect blindness = new PotionEffect(PotionEffectType.BLINDNESS, 200, 10, false); + PotionEffect slowness = new PotionEffect(PotionEffectType.SLOW, 200, 10, false); + invisibility.apply(p); + blindness.apply(p); + slowness.apply(p); p.setNoDamageTicks(1728000); } -- cgit v1.2.3