UpdateChecker
Properties
$endpoint protected
php
protected string $endpoint$server protected
php
protected \pocketmine\Server $server$updateInfo protected
php
protected ?\pocketmine\updater\UpdateInfo $updateInfoMethods
__construct()
php
public function __construct(\pocketmine\Server $server, string $endpoint)checkUpdate() protected
php
protected function checkUpdate(\pocketmine\updater\UpdateInfo $updateInfo) : voidChecks the update information against the current server version to decide if there's an update
checkUpdateCallback()
php
public function checkUpdateCallback(\pocketmine\updater\UpdateInfo $updateInfo) : voidCallback used at the end of the update checking task
checkUpdateError()
php
public function checkUpdateError(string $error) : voiddoCheck()
php
public function doCheck() : voidSchedules an AsyncTask to check for an update.
getChannel()
php
public function getChannel() : stringReturns the channel used for update checking (stable, beta, dev)
getEndpoint()
php
public function getEndpoint() : stringReturns the host used for update checks.
getUpdateInfo()
php
public function getUpdateInfo() : ?\pocketmine\updater\UpdateInfoReturns the last retrieved update data.
hasUpdate()
php
public function hasUpdate() : boolReturns whether there is an update available.
printConsoleMessage() protected
php
protected function printConsoleMessage(array $lines, string $logLevel = \LogLevel::INFO) : voidshowChannelSuggestionBeta() protected
php
protected function showChannelSuggestionBeta() : voidshowChannelSuggestionStable() protected
php
protected function showChannelSuggestionStable() : voidshowConsoleUpdate()
php
public function showConsoleUpdate() : voidPosts a warning to the console to tell the user there is an update available
