Hi, i use effect using PHP: $ev->getPlayer()->addEffect(Effect::SPEED);$ev->getPlayer()->addEffect(Effect::WEAKNESS); Now, How to remove all effect from the player using removeEffect() ?
You can use $player->removeAllEffects() to remove all effects from a player. As for removing a specific effect, I would think that the appropriate function would be $player->removeEffect(), so if you wanted to remove speed effect from a player: PHP: $player->removeEffect(Effect::SPEED);
In that case, this might be the better solution: PHP: $effect = Effect::getEffect(Effect::SPEED)->setDuration(60)->setAmplifier(12);$player->addEffect($effect); Do keep in mind that 60 seconds in the duration field is only an example... -- Cleaner: PHP: $player->addEffect(Effect::getEffect(Effect::SPEED)->setDuration(60)->setAmplifier(12));