BeeAZ-pm-pl / Oneblock

ONEBLOCK POCKETMINE
The Unlicense
10 stars 7 forks source link

Warning: the Oneblock plugin was indirectly involved in this crash. #23

Open KaptenZee opened 2 years ago

KaptenZee commented 2 years ago
}

/**
 * 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()){
ErosionYT commented 2 years ago

wheres the error?