mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Replaced Position->getLevel() null checks with isValid()
This commit is contained in:
@ -269,8 +269,8 @@ abstract class Tile extends Position{
|
||||
if(!$this->closed){
|
||||
$this->closed = true;
|
||||
|
||||
if(($level = $this->getLevel()) instanceof Level){
|
||||
$level->removeTile($this);
|
||||
if($this->isValid()){
|
||||
$this->level->removeTile($this);
|
||||
$this->setLevel(null);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user