add a more flexible hook system to EffectManager

This commit is contained in:
Dylan K. Taylor
2019-08-01 19:36:13 +01:00
parent d09e79e682
commit 7e4236a3ec
4 changed files with 32 additions and 29 deletions

View File

@ -1453,14 +1453,6 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
return $this->isCreative() or parent::canBreathe();
}
public function onEffectAdded(EffectInstance $effect, bool $replacesOldEffect) : void{
$this->networkSession->onEntityEffectAdded($this, $effect, $replacesOldEffect);
}
public function onEffectRemoved(EffectInstance $effect) : void{
$this->networkSession->onEntityEffectRemoved($this, $effect);
}
/**
* Returns whether the player can interact with the specified position. This checks distance and direction.
*