/** * @param bool $force * * @return bool */ public function save($force = false) { if (!$this->getAutoSave() and !$force) { return false; } $this->server->getPluginManager()->callEvent(new LevelSaveEvent($this)); $this->provider->setTime((int) $this->time); $this->saveChunks(); if ($this->provider instanceof BaseLevelProvider) { $this->provider->saveLevelData(); } return true; }