public function initEntity() { $this->setMaxHealth(1); parent::initEntity(); if (isset($this->namedtag->Motive)) { $this->motive = $this->namedtag["Motive"]; } else { $this->close(); } }