-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from aternosorg/add-auth-server-down-problem
Add problem and solution for Auth server unreachable
- Loading branch information
Showing
7 changed files
with
668 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
namespace Aternos\Codex\Minecraft\Analysis\Problem\Vanilla; | ||
|
||
use Aternos\Codex\Minecraft\Translator\Translator; | ||
use Aternos\Codex\Minecraft\Analysis\Solution\Vanilla\AuthServerSolution; | ||
|
||
/** | ||
* Class AuthServerProblem | ||
* | ||
* @package Aternos\Codex\Minecraft\Analysis\Problem\Vanilla | ||
*/ | ||
class AuthServerProblem extends VanillaProblem | ||
{ | ||
/** | ||
* Get a human-readable message | ||
* | ||
* @return string | ||
*/ | ||
public function getMessage(): string | ||
{ | ||
return Translator::getInstance()->getTranslation("auth-server-problem"); | ||
} | ||
|
||
/** | ||
* Get an array of possible patterns | ||
* | ||
* The array key of the pattern will be passed to setMatches() | ||
* | ||
* @return string[] | ||
*/ | ||
public static function getPatterns(): array | ||
{ | ||
return ['#Failed to read from https://api\.minecraftservices\.com/publickeys due to Connect#']; | ||
} | ||
|
||
|
||
/** | ||
* Apply the matches from the pattern | ||
* | ||
* @param array $matches | ||
* @param mixed $patternKey | ||
* @return void | ||
*/ | ||
public function setMatches(array $matches, mixed $patternKey): void | ||
{ | ||
$this->addSolution(new AuthServerSolution()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace Aternos\Codex\Minecraft\Analysis\Solution\Vanilla; | ||
|
||
use Aternos\Codex\Minecraft\Translator\Translator; | ||
|
||
class AuthServerSolution extends VanillaSolution | ||
{ | ||
/** | ||
* Get the solution as a human-readable message | ||
* | ||
* @return string | ||
*/ | ||
public function getMessage(): string | ||
{ | ||
return Translator::getInstance()->getTranslation("auth-server-solution"); | ||
} | ||
} |
Oops, something went wrong.