How to remove potion effect from player if it is activated

Discussion in 'Skript' started by iTweakz, Jun 9, 2017.

  1. How to make this with skript
    Code (Text):
    if (player.hasPotionEffect(PotionEffectType.SPEED)) {
              player.removePotionEffect(PotionEffectType.SPEED);
     
  2. Two

    Two

    Code (Text):

    if player has speed:
      remove speed from the player
    If I remember correctly
     
  3. With this you can remove every effect:
    Code (Text):
    for (PotionEffect pt : p.getActivePotionEffects()) {
       p.removePotionEffect(pt.getType());
    }
     
  4. Sadly, he's using Skript
     
  5. oops, I didn't see this