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