pocketmine\scheduler\AsyncTask::getFromThreadStore PHP Method

getFromThreadStore() public method

You have to initialize this in some way from the task on run
public getFromThreadStore ( string $identifier ) : mixed
$identifier string
return mixed
    public function getFromThreadStore($identifier)
    {
        global $store;
        return $this->isGarbage() ? null : $store[$identifier];
    }