PocketMine-MP 5.15.1 git-5ef247620a7c6301a849b54e5ef1009217729fc8
pocketmine\entity\effect\PoisonEffect Class Reference
+ Inheritance diagram for pocketmine\entity\effect\PoisonEffect:
+ Collaboration diagram for pocketmine\entity\effect\PoisonEffect:

Public Member Functions

 __construct (Translatable|string $name, Color $color, bool $isBad=false, int $defaultDuration=600, bool $hasBubbles=true, bool $fatal=false)
 
 add (Living $entity, EffectInstance $instance)
 
 applyEffect (Living $entity, EffectInstance $instance, float $potency=1.0, ?Entity $source=null)
 
 canTick (EffectInstance $instance)
 
 getColor ()
 
 getDefaultDuration ()
 
 getName ()
 
 hasBubbles ()
 
 isBad ()
 
 remove (Living $entity, EffectInstance $instance)
 

Detailed Description

Definition at line 32 of file PoisonEffect.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\entity\effect\PoisonEffect::__construct ( Translatable|string  $name,
Color  $color,
bool  $isBad = false,
int  $defaultDuration = 600,
bool  $hasBubbles = true,
bool  $fatal = false 
)

Definition at line 35 of file PoisonEffect.php.

Member Function Documentation

◆ add()

pocketmine\entity\effect\Effect::add ( Living  $entity,
EffectInstance  $instance 
)
inherited

◆ applyEffect()

pocketmine\entity\effect\PoisonEffect::applyEffect ( Living  $entity,
EffectInstance  $instance,
float  $potency = 1.0,
?Entity  $source = null 
)

Applies effect results to an entity. This will not be called unless canTick() returns true.

Reimplemented from pocketmine\entity\effect\Effect.

Definition at line 47 of file PoisonEffect.php.

◆ canTick()

pocketmine\entity\effect\PoisonEffect::canTick ( EffectInstance  $instance)

Returns whether the effect will do something on the current tick.

Reimplemented from pocketmine\entity\effect\Effect.

Definition at line 40 of file PoisonEffect.php.

References pocketmine\entity\effect\EffectInstance\getDuration().

+ Here is the call graph for this function:

◆ getColor()

pocketmine\entity\effect\Effect::getColor ( )
inherited

Returns a Color object representing this effect's particle colour.

Definition at line 61 of file Effect.php.

Referenced by pocketmine\entity\effect\EffectInstance\__construct().

+ Here is the caller graph for this function:

◆ getDefaultDuration()

pocketmine\entity\effect\Effect::getDefaultDuration ( )
inherited

Returns the default duration (in ticks) this effect will apply for if a duration is not specified.

Definition at line 76 of file Effect.php.

Referenced by pocketmine\entity\effect\EffectInstance\__construct().

+ Here is the caller graph for this function:

◆ getName()

pocketmine\entity\effect\Effect::getName ( )
inherited

Returns the translation key used to translate this effect's name.

Definition at line 54 of file Effect.php.

◆ hasBubbles()

pocketmine\entity\effect\Effect::hasBubbles ( )
inherited

Returns whether this effect will give the subject potion bubbles.

Definition at line 83 of file Effect.php.

◆ isBad()

pocketmine\entity\effect\Effect::isBad ( )
inherited

Returns whether this effect is harmful. TODO: implement inverse effect results for undead mobs

Definition at line 69 of file Effect.php.

◆ remove()

pocketmine\entity\effect\Effect::remove ( Living  $entity,
EffectInstance  $instance 
)
inherited

The documentation for this class was generated from the following file: