From 8c196cb35f5f3c4dfa52916c84aeac32fcf407bc Mon Sep 17 00:00:00 2001 From: Trixkz Date: Thu, 25 Nov 2021 10:28:12 -0500 Subject: [PATCH] t --- .../rip/tilly/bedwars/listeners/game/MovementListener.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/rip/tilly/bedwars/listeners/game/MovementListener.java b/src/main/java/rip/tilly/bedwars/listeners/game/MovementListener.java index 3e31caa..ecf4e1f 100644 --- a/src/main/java/rip/tilly/bedwars/listeners/game/MovementListener.java +++ b/src/main/java/rip/tilly/bedwars/listeners/game/MovementListener.java @@ -77,6 +77,10 @@ public class MovementListener implements Listener { if (!player.getActivePotionEffects().contains(PotionEffectType.REGENERATION)) { player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 1000000, 0)); } + } else { + if (player.getActivePotionEffects().contains(PotionEffectType.REGENERATION)) { + player.removePotionEffect(PotionEffectType.REGENERATION); + } } }