public function onUpdate($currentTick) { if ($this->age > 20 * 60 * 10) { $this->kill(); } return parent::onUpdate($currentTick); }