mirror of
https://github.com/Matthww/PlayerInfo.git
synced 2025-05-09 23:39:22 +00:00
modified: src/Matthww/PlayerInfo/Tasks/FetchModelsTask.php
This commit is contained in:
parent
8e659424cd
commit
94cab0f223
@ -16,10 +16,11 @@ 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");
|
$result = Internet::getURL("https://raw.githubusercontent.com/Matthww/PlayerInfo/master/resources/models.yml");
|
||||||
if(!$result instanceof string) {
|
if(!is_string($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);
|
||||||
$this->setResult(true);
|
$this->setResult(true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user