Entity: fixed undefined variable in getTargetEntity()

This commit is contained in:
Dylan K. Taylor 2019-08-05 16:19:49 +01:00
parent 1fcec87b98
commit cf271dab2b

View File

@ -494,7 +494,7 @@ abstract class Entity extends Location{
* @return Entity|null
*/
public function getTargetEntity() : ?Entity{
return $this->targetId !== null ? $this->server->getWorldManager()->findEntity($eid) : null;
return $this->targetId !== null ? $this->server->getWorldManager()->findEntity($this->targetId) : null;
}
/**