mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Added API method Entity->isClosed() and made Entity->closed protected
This commit is contained in:
@ -817,7 +817,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
|
||||
if($this->spawned){
|
||||
foreach($this->level->getChunkEntities($x, $z) as $entity){
|
||||
if($entity !== $this and !$entity->closed and $entity->isAlive()){
|
||||
if($entity !== $this and !$entity->isClosed() and $entity->isAlive()){
|
||||
$entity->spawnTo($this);
|
||||
}
|
||||
}
|
||||
@ -896,7 +896,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
foreach($this->usedChunks as $index => $c){
|
||||
Level::getXZ($index, $chunkX, $chunkZ);
|
||||
foreach($this->level->getChunkEntities($chunkX, $chunkZ) as $entity){
|
||||
if($entity !== $this and !$entity->closed and $entity->isAlive()){
|
||||
if($entity !== $this and !$entity->isClosed() and $entity->isAlive()){
|
||||
$entity->spawnTo($this);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user