diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php index da6ef5cab..ee1935fa0 100644 --- a/src/pocketmine/level/Level.php +++ b/src/pocketmine/level/Level.php @@ -2835,23 +2835,17 @@ class Level implements ChunkManager, Metadatable{ return false; } - try{ - if($trySave and $this->getAutoSave() and $chunk->isGenerated()){ - if($chunk->hasChanged() or count($chunk->getTiles()) > 0 or count($chunk->getSavableEntities()) > 0){ - $this->provider->saveChunk($chunk); - } + if($trySave and $this->getAutoSave() and $chunk->isGenerated()){ + if($chunk->hasChanged() or count($chunk->getTiles()) > 0 or count($chunk->getSavableEntities()) > 0){ + $this->provider->saveChunk($chunk); } - - foreach($this->getChunkLoaders($x, $z) as $loader){ - $loader->onChunkUnloaded($chunk); - } - - $chunk->onUnload(); - }catch(\Throwable $e){ - $logger = $this->server->getLogger(); - $logger->error($this->server->getLanguage()->translateString("pocketmine.level.chunkUnloadError", [$e->getMessage()])); - $logger->logException($e); } + + foreach($this->getChunkLoaders($x, $z) as $loader){ + $loader->onChunkUnloaded($chunk); + } + + $chunk->onUnload(); } unset($this->chunks[$chunkHash]);