mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
Added API method Living::hasEffects() (#2054)
This commit is contained in:
parent
e5ec8fa603
commit
2b036b1a5c
@ -232,6 +232,14 @@ abstract class Living extends Entity implements Damageable{
|
||||
public function hasEffect(int $effectId) : bool{
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user