mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 08:39:53 +00:00
Added API method Living::hasEffects() (#2054)
This commit is contained in:
parent
e5ec8fa603
commit
2b036b1a5c
@ -233,6 +233,14 @@ abstract class Living extends Entity implements Damageable{
|
|||||||
return isset($this->effects[$effectId]);
|
return isset($this->effects[$effectId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether the mob has any active effects.
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function hasEffects() : bool{
|
||||||
|
return !empty($this->effects);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds an effect to the mob.
|
* Adds an effect to the mob.
|
||||||
* If a weaker effect of the same type is already applied, it will be replaced.
|
* If a weaker effect of the same type is already applied, it will be replaced.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user