mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 08:35:20 +00:00
Improved invalid spawnpoint checking
This commit is contained in:
@ -64,7 +64,7 @@ class Position extends Vector3{
|
||||
* @return bool
|
||||
*/
|
||||
public function isValid(){
|
||||
return $this->getLevel() !== null;
|
||||
return $this->getLevel() instanceof Level;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ class WeakPosition extends Position{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Level
|
||||
* @return Level|null
|
||||
*/
|
||||
public function getLevel(){
|
||||
return Server::getInstance()->getLevel($this->levelId);
|
||||
|
Reference in New Issue
Block a user