}
/**
* Returns the position's world if valid. Throws an error if the world is unexpectedly invalid.
*
* @throws AssumptionFailedError
*/
public function getWorld() : World{
if($this->world === null || !$this->world->isLoaded()){
throw new AssumptionFailedError("Position world is null or has been unloaded");
}
return $this->world;
}
/**
* Checks if this object has a valid reference to a loaded world
*/
public function isValid() : bool{
if($this->world !== null && !$this->world->isLoaded()){