mirror of
https://github.com/Matthww/PlayerInfo.git
synced 2025-06-08 02:18:16 +00:00
fix bug that makes servers unable to start because of no internet (#28)
useless fix but it's pretty much good enough for testing servers --------- Co-authored-by: poggit-bot <poggitbot@gmail.com>
This commit is contained in:
parent
68941bd668
commit
4a643bbc4c
@ -15,13 +15,13 @@ class FetchModelsTask extends AsyncTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function onRun(): void {
|
public function onRun(): void {
|
||||||
$result = Internet::getURL("https://raw.githubusercontent.com/Matthww/PlayerInfo/master/resources/models.yml")->getBody();
|
$result = Internet::getURL("https://raw.githubusercontent.com/Matthww/PlayerInfo/master/resources/models.yml");
|
||||||
if(!is_string($result)) {
|
if(is_null($result)) {
|
||||||
$this->setResult(false);
|
$this->setResult(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
file_put_contents($this->path. "models.yml", $result);
|
file_put_contents($this->path. "models.yml", $result->getBody());
|
||||||
$this->setResult(true);
|
$this->setResult(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user