mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
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:
parent
ecdfd9ea26
commit
13d4131d0d
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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.",
|
||||
|
Loading…
x
Reference in New Issue
Block a user