mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +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;
|
||||
/** @var string */
|
||||
protected $endpoint;
|
||||
/** @var array|null */
|
||||
/* @var mixed[]|null */
|
||||
protected $updateInfo = null;
|
||||
/** @var VersionString|null */
|
||||
protected $newVersion;
|
||||
@ -65,6 +65,8 @@ class AutoUpdater{
|
||||
|
||||
/**
|
||||
* Callback used at the end of the update checking task
|
||||
*
|
||||
* @param mixed[] $updateInfo
|
||||
*/
|
||||
public function checkUpdateCallback(array $updateInfo) : void{
|
||||
$this->updateInfo = $updateInfo;
|
||||
@ -127,6 +129,9 @@ class AutoUpdater{
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[] $lines
|
||||
*/
|
||||
protected function printConsoleMessage(array $lines, string $logLevel = \LogLevel::INFO) : void{
|
||||
$title = $this->server->getName() . ' Auto Updater';
|
||||
$this->logger->log($logLevel, sprintf('----- %s -----', $title));
|
||||
@ -138,6 +143,8 @@ class AutoUpdater{
|
||||
|
||||
/**
|
||||
* Returns the last retrieved update data.
|
||||
*
|
||||
* @return mixed[]|null
|
||||
*/
|
||||
public function getUpdateInfo() : ?array{
|
||||
return $this->updateInfo;
|
||||
|
Loading…
x
Reference in New Issue
Block a user