Added API method Entity->isClosed() and made Entity->closed protected

This commit is contained in:
Dylan K. Taylor
2017-08-16 19:30:23 +01:00
parent 20aa519f3a
commit eebc52e00b
7 changed files with 21 additions and 8 deletions

View File

@ -89,7 +89,7 @@ class McRegion extends BaseLevelProvider{
$entities = [];
foreach($chunk->getEntities() as $entity){
if(!($entity instanceof Player) and !$entity->closed){
if(!($entity instanceof Player) and !$entity->isClosed()){
$entity->saveNBT();
$entities[] = $entity->namedtag;
}