mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 12:04:46 +00:00
Fixed crash on tile unloading
This commit is contained in:
@@ -1048,7 +1048,9 @@ abstract class Entity extends Position implements Metadatable{
|
||||
if($this->chunk instanceof FullChunk){
|
||||
$this->chunk->removeEntity($this);
|
||||
}
|
||||
$this->getLevel()->removeEntity($this);
|
||||
if(($level = $this->getLevel()) instanceof Level){
|
||||
$level->removeEntity($this);
|
||||
}
|
||||
$this->despawnFromAll();
|
||||
$this->level->release();
|
||||
}
|
||||
|
Reference in New Issue
Block a user