diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/ParkourManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/ParkourManager.java index 211472a06..ac79a341b 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/ParkourManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/ParkourManager.java @@ -20,6 +20,7 @@ import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerVelocityEvent; +import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.util.Vector; @@ -192,8 +193,11 @@ public class ParkourManager extends MiniPlugin } else { - for (PotionEffectType type : PotionEffectType.values()) - player.removePotionEffect(type); + + for (Iterator iterator = player.getActivePotionEffects().iterator(); iterator.hasNext();) + { + player.removePotionEffect(iterator.next().getType()); + } } } }