modified: src/Matthww/PlayerInfo/Tasks/FetchModelsTask.php

This commit is contained in:
Keenan Yafiq
2023-08-15 20:30:15 +07:00
parent 94cab0f223
commit 55e3a9df9e

View File

@ -15,12 +15,12 @@ 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")->getBody();
if(!is_string($result)) { 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);
} }