Added \pocketmine\RESOURCE_PATH and Server->getResourcePath()

This commit is contained in:
Dylan K. Taylor 2017-12-11 19:50:57 +00:00
parent a5fc77749f
commit 1f1531810d
2 changed files with 9 additions and 0 deletions

View File

@ -171,6 +171,8 @@ namespace pocketmine {
ini_set("memory_limit", '-1');
define('pocketmine\START_TIME', microtime(true));
define('pocketmine\RESOURCE_PATH', \pocketmine\PATH . 'src' . DIRECTORY_SEPARATOR . 'pocketmine' . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR);
$opts = getopt("", ["data:", "plugins:", "no-wizard", "enable-profiler"]);
define('pocketmine\DATA', isset($opts["data"]) ? $opts["data"] . DIRECTORY_SEPARATOR : \getcwd() . DIRECTORY_SEPARATOR);

View File

@ -320,6 +320,13 @@ class Server{
return \pocketmine\PATH;
}
/**
* @return string
*/
public function getResourcePath() : string{
return \pocketmine\RESOURCE_PATH;
}
/**
* @return string
*/