mirror of
https://github.com/Matthww/PlayerInfo.git
synced 2025-09-11 18:10:04 +00:00
Compare commits
2 Commits
a5fd8adc2f
...
master
Author | SHA1 | Date | |
---|---|---|---|
4a643bbc4c | |||
68941bd668 |
@ -15,13 +15,13 @@ class FetchModelsTask extends AsyncTask {
|
||||
}
|
||||
|
||||
public function onRun(): void {
|
||||
$result = Internet::getURL("https://raw.githubusercontent.com/Matthww/PlayerInfo/master/resources/models.yml")->getBody();
|
||||
if(!is_string($result)) {
|
||||
$result = Internet::getURL("https://raw.githubusercontent.com/Matthww/PlayerInfo/master/resources/models.yml");
|
||||
if(is_null($result)) {
|
||||
$this->setResult(false);
|
||||
return;
|
||||
}
|
||||
|
||||
file_put_contents($this->path. "models.yml", $result);
|
||||
file_put_contents($this->path. "models.yml", $result->getBody());
|
||||
$this->setResult(true);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user