mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-12 12:55:21 +00:00
updater: populate missing return type information
This commit is contained in:
parent
db734675d8
commit
e8a5fa8a37
@ -63,6 +63,8 @@ class AutoUpdater{
|
|||||||
* Callback used at the end of the update checking task
|
* Callback used at the end of the update checking task
|
||||||
*
|
*
|
||||||
* @param array $updateInfo
|
* @param array $updateInfo
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function checkUpdateCallback(array $updateInfo){
|
public function checkUpdateCallback(array $updateInfo){
|
||||||
$this->updateInfo = $updateInfo;
|
$this->updateInfo = $updateInfo;
|
||||||
@ -92,6 +94,8 @@ class AutoUpdater{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Posts a warning to the console to tell the user there is an update available
|
* Posts a warning to the console to tell the user there is an update available
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function showConsoleUpdate(){
|
public function showConsoleUpdate(){
|
||||||
$messages = [
|
$messages = [
|
||||||
@ -109,12 +113,17 @@ class AutoUpdater{
|
|||||||
* Shows a warning to a player to tell them there is an update available
|
* Shows a warning to a player to tell them there is an update available
|
||||||
*
|
*
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function showPlayerUpdate(Player $player){
|
public function showPlayerUpdate(Player $player){
|
||||||
$player->sendMessage(TextFormat::DARK_PURPLE . "The version of " . $this->server->getName() . " that this server is running is out of date. Please consider updating to the latest version.");
|
$player->sendMessage(TextFormat::DARK_PURPLE . "The version of " . $this->server->getName() . " that this server is running is out of date. Please consider updating to the latest version.");
|
||||||
$player->sendMessage(TextFormat::DARK_PURPLE . "Check the console for more details.");
|
$player->sendMessage(TextFormat::DARK_PURPLE . "Check the console for more details.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
protected function showChannelSuggestionStable(){
|
protected function showChannelSuggestionStable(){
|
||||||
$this->printConsoleMessage([
|
$this->printConsoleMessage([
|
||||||
"It appears you're running a Stable build, when you've specified that you prefer to run " . ucfirst($this->getChannel()) . " builds.",
|
"It appears you're running a Stable build, when you've specified that you prefer to run " . ucfirst($this->getChannel()) . " builds.",
|
||||||
@ -122,6 +131,9 @@ class AutoUpdater{
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
protected function showChannelSuggestionBeta(){
|
protected function showChannelSuggestionBeta(){
|
||||||
$this->printConsoleMessage([
|
$this->printConsoleMessage([
|
||||||
"It appears you're running a Beta build, when you've specified that you prefer to run Stable builds.",
|
"It appears you're running a Beta build, when you've specified that you prefer to run Stable builds.",
|
||||||
@ -129,6 +141,9 @@ class AutoUpdater{
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
protected function printConsoleMessage(array $lines, string $logLevel = \LogLevel::INFO){
|
protected function printConsoleMessage(array $lines, string $logLevel = \LogLevel::INFO){
|
||||||
$logger = $this->server->getLogger();
|
$logger = $this->server->getLogger();
|
||||||
|
|
||||||
@ -151,6 +166,8 @@ class AutoUpdater{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Schedules an AsyncTask to check for an update.
|
* Schedules an AsyncTask to check for an update.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function doCheck(){
|
public function doCheck(){
|
||||||
$this->server->getAsyncPool()->submitTask(new UpdateCheckTask($this->endpoint, $this->getChannel()));
|
$this->server->getAsyncPool()->submitTask(new UpdateCheckTask($this->endpoint, $this->getChannel()));
|
||||||
@ -158,6 +175,8 @@ class AutoUpdater{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks the update information against the current server version to decide if there's an update
|
* Checks the update information against the current server version to decide if there's an update
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function checkUpdate(){
|
protected function checkUpdate(){
|
||||||
if($this->updateInfo === null){
|
if($this->updateInfo === null){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user