Remove player update warnings

a player ingame is not going to have access to the terminal to update PM, and if they do, they can see the warning on the console themselves anyway.
This commit is contained in:
Dylan K. Taylor 2021-08-14 13:27:21 +01:00
parent ecdfd9ea26
commit 13d4131d0d
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
3 changed files with 0 additions and 15 deletions

View File

@ -155,7 +155,6 @@ auto-updater:
enabled: true
on-update:
warn-console: true
warn-ops: true
#Can be development, alpha, beta or stable.
preferred-channel: stable
#If using a development version, it will suggest changing the channel

View File

@ -770,10 +770,6 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
$this->spawnToAll();
if($this->server->getUpdater()->hasUpdate() and $this->hasPermission(DefaultPermissionNames::BROADCAST_ADMIN) and $this->server->getConfigGroup()->getPropertyBool("auto-updater.on-update.warn-ops", true)){
$this->server->getUpdater()->showPlayerUpdate($this);
}
if($this->getHealth() <= 0){
$this->logger->debug("Quit while dead, forcing respawn");
$this->respawn();

View File

@ -24,9 +24,7 @@ declare(strict_types=1);
namespace pocketmine\updater;
use pocketmine\event\server\UpdateNotifyEvent;
use pocketmine\player\Player;
use pocketmine\Server;
use pocketmine\utils\TextFormat;
use pocketmine\utils\VersionString;
use pocketmine\VersionInfo;
use function date;
@ -105,14 +103,6 @@ class AutoUpdater{
$this->printConsoleMessage($messages, \LogLevel::WARNING);
}
/**
* Shows a warning to a player to tell them there is an update available
*/
public function showPlayerUpdate(Player $player) : void{
$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.");
}
protected function showChannelSuggestionStable() : void{
$this->printConsoleMessage([
"It appears you're running a Stable build, when you've specified that you prefer to run " . ucfirst($this->getChannel()) . " builds.",