public function removeEffect($effectId)
{
Server::getInstance()->getPluginManager()->callEvent($ev = new EntityEffectRemoveEvent($this, $effectId));
if ($ev->isCancelled()) {
return false;
}
if (isset($this->effects[$effectId])) {
$effect = $this->effects[$effectId];
unset($this->effects[$effectId]);
$effect->remove($this);
if ($effectId === Effect::ABSORPTION and $this instanceof Human) {
$this->setAbsorption(0);
}
$this->recalculateEffectColor();
return true;
}
}