Chunk: Clean up unnecessary checks in unload()

This commit is contained in:
Dylan K. Taylor
2018-01-02 10:48:01 +00:00
parent bde0ba1100
commit c3cc6f9880
2 changed files with 2 additions and 17 deletions

View File

@ -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;
}
/**