mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Replaced Position->getLevel() null checks with isValid()
This commit is contained in:
@ -2003,8 +2003,8 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
$this->chunk = null;
|
||||
}
|
||||
|
||||
if($this->getLevel() !== null){
|
||||
$this->getLevel()->removeEntity($this);
|
||||
if($this->isValid()){
|
||||
$this->level->removeEntity($this);
|
||||
$this->setLevel(null);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user