Skip to content

UpdateChecker ​

class · pocketmine\updater\UpdateChecker · source

Properties ​

$endpoint protected ​

php
protected string $endpoint

$server protected ​

php
protected \pocketmine\Server $server

$updateInfo protected ​

php
protected ?\pocketmine\updater\UpdateInfo $updateInfo

Methods ​

__construct() ​

php
public function __construct(\pocketmine\Server $server, string $endpoint)

checkUpdate() protected ​

php
protected function checkUpdate(\pocketmine\updater\UpdateInfo $updateInfo) : void

Checks the update information against the current server version to decide if there's an update

checkUpdateCallback() ​

php
public function checkUpdateCallback(\pocketmine\updater\UpdateInfo $updateInfo) : void

Callback used at the end of the update checking task

checkUpdateError() ​

php
public function checkUpdateError(string $error) : void

doCheck() ​

php
public function doCheck() : void

Schedules an AsyncTask to check for an update.

getChannel() ​

php
public function getChannel() : string

Returns the channel used for update checking (stable, beta, dev)

getEndpoint() ​

php
public function getEndpoint() : string

Returns the host used for update checks.

getUpdateInfo() ​

php
public function getUpdateInfo() : ?\pocketmine\updater\UpdateInfo

Returns the last retrieved update data.

hasUpdate() ​

php
public function hasUpdate() : bool

Returns whether there is an update available.

printConsoleMessage() protected ​

php
protected function printConsoleMessage(array $lines, string $logLevel = \LogLevel::INFO) : void

showChannelSuggestionBeta() protected ​

php
protected function showChannelSuggestionBeta() : void

showChannelSuggestionStable() protected ​

php
protected function showChannelSuggestionStable() : void

showConsoleUpdate() ​

php
public function showConsoleUpdate() : void

Posts a warning to the console to tell the user there is an update available

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.