diff --git a/app/Repositories/Wings/DaemonServerRepository.php b/app/Repositories/Wings/DaemonServerRepository.php index 676eed6d7..ae4d1333a 100644 --- a/app/Repositories/Wings/DaemonServerRepository.php +++ b/app/Repositories/Wings/DaemonServerRepository.php @@ -72,11 +72,19 @@ class DaemonServerRepository extends DaemonRepository } /** - * Delete a server from the daemon. + * Delete a server from the daemon, forcibly if passed. + * + * @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException */ public function delete(): void { - throw new BadMethodCallException('Method is not implemented.'); + Assert::isInstanceOf($this->server, Server::class); + + try { + $this->getHttpClient()->delete('/api/servers/' . $this->server->uuid); + } catch (TransferException $exception) { + throw new DaemonConnectionException($exception); + } } /**