Skip to content

EntityEffectAddEvent ​

class · pocketmine\event\entity\EntityEffectAddEvent · source

Extends EntityEffectEvent

Called when an effect is added to an Entity.

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Entity $entity, \pocketmine\entity\effect\EffectInstance $effect, ?\pocketmine\entity\effect\EffectInstance $oldEffect = null)

getOldEffect() ​

php
public function getOldEffect() : ?\pocketmine\entity\effect\EffectInstance

hasOldEffect() ​

php
public function hasOldEffect() : bool

willModify() ​

php
public function willModify() : bool

Returns whether the effect addition will replace an existing effect already applied to the entity.

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.