Merge branch 'remove-weak-position'

This commit is contained in:
Dylan K. Taylor
2018-05-10 13:53:07 +01:00
3 changed files with 12 additions and 97 deletions

View File

@ -94,7 +94,13 @@ class Position extends Vector3{
* @return bool
*/
public function isValid() : bool{
return $this->getLevel() instanceof Level;
if($this->level !== null and $this->level->isClosed()){
$this->level = null;
return false;
}
return $this->level !== null;
}
/**