Relocated MINECRAFT_VERSION and MINECRAFT_VERSION_NETWORK to ProtocolInfo and deprecated the originals

This commit is contained in:
Dylan K. Taylor
2016-12-11 19:42:53 +00:00
parent 5e6d452678
commit a8694dcbf7
4 changed files with 16 additions and 4 deletions

View File

@ -65,6 +65,7 @@ namespace {
}
namespace pocketmine {
use pocketmine\network\protocol\Info as ProtocolInfo;
use pocketmine\utils\Binary;
use pocketmine\utils\MainLogger;
use pocketmine\utils\ServerKiller;
@ -76,8 +77,6 @@ namespace pocketmine {
const VERSION = "1.6.1dev";
const API_VERSION = "2.1.0";
const CODENAME = "Unleashed";
const MINECRAFT_VERSION = "v0.16.0.5 alpha";
const MINECRAFT_VERSION_NETWORK = "0.16.0.5";
/*
* Startup code. Do not look at it, it may harm you.
@ -146,6 +145,16 @@ namespace pocketmine {
define('pocketmine\DATA', isset($opts["data"]) ? $opts["data"] . DIRECTORY_SEPARATOR : \getcwd() . DIRECTORY_SEPARATOR);
define('pocketmine\PLUGIN_PATH', isset($opts["plugins"]) ? $opts["plugins"] . DIRECTORY_SEPARATOR : \getcwd() . DIRECTORY_SEPARATOR . "plugins" . DIRECTORY_SEPARATOR);
/**
* @deprecated This constant has moved to {@link \pocketmine\network\protocol\Info} and will be removed from here in the future.
*/
const MINECRAFT_VERSION = ProtocolInfo::MINECRAFT_VERSION;
/**
* @deprecated This constant has moved to {@link \pocketmine\network\protocol\Info} and will be removed from here in the future.
*/
const MINECRAFT_VERSION_NETWORK = ProtocolInfo::MINECRAFT_VERSION_NETWORK;
Terminal::init();
define('pocketmine\ANSI', Terminal::hasFormattingCodes());