diff --git a/app/BlueprintFramework/Services/PlaceholderService/BlueprintPlaceholderService.php b/app/BlueprintFramework/Services/PlaceholderService/BlueprintPlaceholderService.php index b4aab08..5fb5e2b 100644 --- a/app/BlueprintFramework/Services/PlaceholderService/BlueprintPlaceholderService.php +++ b/app/BlueprintFramework/Services/PlaceholderService/BlueprintPlaceholderService.php @@ -7,4 +7,5 @@ class BlueprintPlaceholderService public function version(): string { return "::v"; } public function folder(): string { return "::f"; } public function installed(): string { return "NOTINSTALLED"; } + public function api_url(): string { return "http://api.blueprint.zip:50000"; } } diff --git a/app/Console/Commands/BlueprintFramework/LatestCommand.php b/app/Console/Commands/BlueprintFramework/LatestCommand.php index 3f9fdc7..22879b2 100644 --- a/app/Console/Commands/BlueprintFramework/LatestCommand.php +++ b/app/Console/Commands/BlueprintFramework/LatestCommand.php @@ -3,6 +3,7 @@ namespace Pterodactyl\Console\Commands\BlueprintFramework; use Illuminate\Console\Command; +use Pterodactyl\BlueprintFramework\Services\PlaceholderService\BlueprintPlaceholderService; class LatestCommand extends Command { @@ -13,6 +14,7 @@ class LatestCommand extends Command * LatestCommand constructor. */ public function __construct( + private BlueprintPlaceholderService $PlaceholderService, ) { parent::__construct(); } /** @@ -20,7 +22,7 @@ class LatestCommand extends Command */ public function handle() { - $api_url = "http://api.blueprint.zip:50000/api/latest"; + $api_url = $this->PlaceholderService->api_url()."/api/latest"; $context = stream_context_create([ 'http' => [ 'method' => 'GET',