Possible fix for #1661

This commit is contained in:
Shoghi Cervantes
2014-10-05 16:32:15 +02:00
parent 5e03e157ad
commit 6b65b68ebc
7 changed files with 24 additions and 39 deletions

View File

@ -267,17 +267,24 @@ abstract class BaseFullChunk implements FullChunk{
if($save === true){
$level->saveChunk($this->getX(), $this->getZ());
}
if($this->getProvider()->unloadChunk($this->getX(), $this->getZ(), $safe)){
if($safe === true){
foreach($this->getEntities() as $entity){
if($entity instanceof Player){
continue;
return false;
}
$entity->close();
}
foreach($this->getTiles() as $tile){
$tile->close();
}
}
foreach($this->getEntities() as $entity){
if($entity instanceof Player){
continue;
}
$entity->close();
}
foreach($this->getTiles() as $tile){
$tile->close();
}
return true;
}
public function getBlockIdArray(){