public function removeEntity(Entity $entity) { unset($this->entities[$entity->getId()]); if (!$entity instanceof Player and $this->isInit) { $this->hasChanged = true; } }