What's here the mistake or what is another option to add an effect to an player for 600 seconds with amplification 4?
PHP: $effect = Effect::getEffect(3);$duration = 600 * 20; // times 20 because it's in ticks$amplification = 4;$effectInstance = new EffectInstance($effect, $duration, $amplification);$player->addEffect($effectInstance);
u need to use : PHP: use pocketmine\entity\Effect;use pocketmine\entity\EffectInstance; and this code : PHP: $player->addEffect((new EffectInstance(Effect::getEffect(Effect::REGENERATION)))->setDuration(intval(20*600))->setAmplifier(intval(4)));