mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Fixed crashes closing entities with unloaded levels
This commit is contained in:
@ -1636,8 +1636,8 @@ abstract class Entity extends Location implements Metadatable{
|
||||
if($this->chunk !== null){
|
||||
$this->chunk->removeEntity($this);
|
||||
}
|
||||
if($this->level !== null){
|
||||
$this->level->removeEntity($this);
|
||||
if($this->getLevel() !== null){
|
||||
$this->getLevel()->removeEntity($this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user