diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php index a9de785b9..2c27cc142 100644 --- a/src/pocketmine/level/Level.php +++ b/src/pocketmine/level/Level.php @@ -2780,8 +2780,7 @@ class Level implements ChunkManager, Metadatable{ } } - //TODO: not checking return value, but is it needed anyway? - $chunk->unload($safe); + $chunk->unload(); }catch(\Throwable $e){ $logger = $this->server->getLogger(); $logger->error($this->server->getLanguage()->translateString("pocketmine.level.chunkUnloadError", [$e->getMessage()])); diff --git a/src/pocketmine/level/format/Chunk.php b/src/pocketmine/level/format/Chunk.php index bef570be9..765c29ffe 100644 --- a/src/pocketmine/level/format/Chunk.php +++ b/src/pocketmine/level/format/Chunk.php @@ -692,20 +692,8 @@ class Chunk{ /** * Unloads the chunk, closing entities and tiles. - * - * @param bool $safe Whether to check if there are still players using this chunk - * - * @return bool */ - public function unload(bool $safe = true) : bool{ - if($safe){ - foreach($this->getEntities() as $entity){ - if($entity instanceof Player){ - return false; - } - } - } - + public function unload() : void{ foreach($this->getEntities() as $entity){ if($entity instanceof Player){ continue; @@ -716,8 +704,6 @@ class Chunk{ foreach($this->getTiles() as $tile){ $tile->close(); } - - return true; } /**