pocketmine\entity\Entity::sendPotionEffects PHP Method

sendPotionEffects() public method

public sendPotionEffects ( Player $player )
$player pocketmine\Player
    public function sendPotionEffects(Player $player)
    {
        foreach ($this->effects as $effect) {
            $pk = new MobEffectPacket();
            $pk->eid = 0;
            $pk->effectId = $effect->getId();
            $pk->amplifier = $effect->getAmplifier();
            $pk->particles = $effect->isVisible();
            $pk->duration = $effect->getDuration();
            $pk->eventId = MobEffectPacket::EVENT_ADD;
            $player->dataPacket($pk);
        }
    }