Definition at line 35 of file EffectManager.php.
◆ __construct()
pocketmine\entity\effect\EffectManager::__construct |
( |
private Living | $entity | ) |
|
◆ add()
Adds an effect to the mob. If a weaker effect of the same type is already applied, it will be replaced. If a weaker or equal-strength effect is already applied but has a shorter duration, it will be replaced.
- Returns
- bool whether the effect has been successfully applied.
Definition at line 126 of file EffectManager.php.
◆ all()
pocketmine\entity\effect\EffectManager::all |
( |
| ) |
|
Returns an array of Effects currently active on the mob.
- Returns
- EffectInstance[]
Definition at line 65 of file EffectManager.php.
◆ clear()
pocketmine\entity\effect\EffectManager::clear |
( |
| ) |
|
◆ get()
pocketmine\entity\effect\EffectManager::get |
( |
Effect | $effect | ) |
|
Returns the effect instance active on this entity with the specified ID, or null if the mob does not have the effect.
Definition at line 108 of file EffectManager.php.
◆ getBubbleColor()
pocketmine\entity\effect\EffectManager::getBubbleColor |
( |
| ) |
|
◆ getEffectAddHooks()
pocketmine\entity\effect\EffectManager::getEffectAddHooks |
( |
| ) |
|
- Returns
- \Closure[]|ObjectSet @phpstan-return ObjectSet<\Closure(EffectInstance, bool $replacesOldEffect) : void>
Definition at line 224 of file EffectManager.php.
◆ getEffectRemoveHooks()
pocketmine\entity\effect\EffectManager::getEffectRemoveHooks |
( |
| ) |
|
- Returns
- \Closure[]|ObjectSet @phpstan-return ObjectSet<\Closure(EffectInstance) : void>
Definition at line 232 of file EffectManager.php.
◆ has()
pocketmine\entity\effect\EffectManager::has |
( |
Effect | $effect | ) |
|
Returns whether the specified effect is active on the mob.
Definition at line 115 of file EffectManager.php.
◆ hasOnlyAmbientEffects()
pocketmine\entity\effect\EffectManager::hasOnlyAmbientEffects |
( |
| ) |
|
◆ recalculateEffectColor()
pocketmine\entity\effect\EffectManager::recalculateEffectColor |
( |
| ) |
|
|
protected |
Recalculates the mob's potion bubbles colour based on the active effects.
Definition at line 170 of file EffectManager.php.
◆ remove()
pocketmine\entity\effect\EffectManager::remove |
( |
Effect | $effectType | ) |
|
Removes the effect with the specified ID from the mob.
Definition at line 81 of file EffectManager.php.
◆ tick()
pocketmine\entity\effect\EffectManager::tick |
( |
int | $tickDiff = 1 | ) |
|
◆ $bubbleColor
Color pocketmine\entity\effect\EffectManager::$bubbleColor |
|
protected |
◆ $effectAddHooks
ObjectSet pocketmine\entity\effect\EffectManager::$effectAddHooks |
|
protected |
◆ $effectRemoveHooks
ObjectSet pocketmine\entity\effect\EffectManager::$effectRemoveHooks |
|
protected |
◆ $effects
array pocketmine\entity\effect\EffectManager::$effects = [] |
|
protected |
◆ $onlyAmbientEffects
bool pocketmine\entity\effect\EffectManager::$onlyAmbientEffects = false |
|
protected |
The documentation for this class was generated from the following file: