mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 06:25:32 +00:00
Merge commit '60b405d944254c940f818ebd0b7aa2603d7968a7'
# Conflicts: # resources/vanilla # src/updater/AutoUpdater.php
This commit is contained in:
commit
3e80850938
@ -41,7 +41,7 @@ class AutoUpdater{
|
|||||||
protected $server;
|
protected $server;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $endpoint;
|
protected $endpoint;
|
||||||
/** @var array|null */
|
/* @var mixed[]|null */
|
||||||
protected $updateInfo = null;
|
protected $updateInfo = null;
|
||||||
/** @var VersionString|null */
|
/** @var VersionString|null */
|
||||||
protected $newVersion;
|
protected $newVersion;
|
||||||
@ -65,6 +65,8 @@ class AutoUpdater{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback used at the end of the update checking task
|
* Callback used at the end of the update checking task
|
||||||
|
*
|
||||||
|
* @param mixed[] $updateInfo
|
||||||
*/
|
*/
|
||||||
public function checkUpdateCallback(array $updateInfo) : void{
|
public function checkUpdateCallback(array $updateInfo) : void{
|
||||||
$this->updateInfo = $updateInfo;
|
$this->updateInfo = $updateInfo;
|
||||||
@ -127,6 +129,9 @@ class AutoUpdater{
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string[] $lines
|
||||||
|
*/
|
||||||
protected function printConsoleMessage(array $lines, string $logLevel = \LogLevel::INFO) : void{
|
protected function printConsoleMessage(array $lines, string $logLevel = \LogLevel::INFO) : void{
|
||||||
$title = $this->server->getName() . ' Auto Updater';
|
$title = $this->server->getName() . ' Auto Updater';
|
||||||
$this->logger->log($logLevel, sprintf('----- %s -----', $title));
|
$this->logger->log($logLevel, sprintf('----- %s -----', $title));
|
||||||
@ -138,6 +143,8 @@ class AutoUpdater{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the last retrieved update data.
|
* Returns the last retrieved update data.
|
||||||
|
*
|
||||||
|
* @return mixed[]|null
|
||||||
*/
|
*/
|
||||||
public function getUpdateInfo() : ?array{
|
public function getUpdateInfo() : ?array{
|
||||||
return $this->updateInfo;
|
return $this->updateInfo;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user