pocketmine\Server::doAutoSave PHP Method

doAutoSave() public method

public doAutoSave ( )
    public function doAutoSave()
    {
        if ($this->getAutoSave()) {
            Timings::$worldSaveTimer->startTiming();
            foreach ($this->players as $index => $player) {
                if ($player->isOnline()) {
                    $player->save(true);
                } elseif (!$player->isConnected()) {
                    $this->removePlayer($player);
                }
            }
            foreach ($this->getLevels() as $level) {
                $level->save(false);
            }
            Timings::$worldSaveTimer->stopTiming();
        }
    }
Server