mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-21 02:41:17 +00:00
Added \pocketmine\RESOURCE_PATH and Server->getResourcePath()
This commit is contained in:
parent
a5fc77749f
commit
1f1531810d
@ -171,6 +171,8 @@ namespace pocketmine {
|
|||||||
ini_set("memory_limit", '-1');
|
ini_set("memory_limit", '-1');
|
||||||
define('pocketmine\START_TIME', microtime(true));
|
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"]);
|
$opts = getopt("", ["data:", "plugins:", "no-wizard", "enable-profiler"]);
|
||||||
|
|
||||||
define('pocketmine\DATA', isset($opts["data"]) ? $opts["data"] . DIRECTORY_SEPARATOR : \getcwd() . DIRECTORY_SEPARATOR);
|
define('pocketmine\DATA', isset($opts["data"]) ? $opts["data"] . DIRECTORY_SEPARATOR : \getcwd() . DIRECTORY_SEPARATOR);
|
||||||
|
@ -320,6 +320,13 @@ class Server{
|
|||||||
return \pocketmine\PATH;
|
return \pocketmine\PATH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getResourcePath() : string{
|
||||||
|
return \pocketmine\RESOURCE_PATH;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user