diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index 31de771ac..012dc413b 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -1643,10 +1643,15 @@ abstract class Entity extends Location implements Metadatable{ $this->despawnFromAll(); if($this->chunk !== null){ $this->chunk->removeEntity($this); + $this->chunk = null; } + if($this->getLevel() !== null){ $this->getLevel()->removeEntity($this); + $this->setLevel(null); } + + $this->namedtag = null; } }