diff --git a/src/pocketmine/Server.php b/src/pocketmine/Server.php index e92e2d650..227ce0a5f 100644 --- a/src/pocketmine/Server.php +++ b/src/pocketmine/Server.php @@ -1459,7 +1459,7 @@ class Server{ $this->logger->info("Loading pocketmine.yml..."); if(!file_exists($this->dataPath . "pocketmine.yml")){ - $content = file_get_contents(\pocketmine\PATH . "src/pocketmine/resources/pocketmine.yml"); + $content = file_get_contents(\pocketmine\RESOURCE_PATH . "pocketmine.yml"); if($version->isDev()){ $content = str_replace("preferred-channel: stable", "preferred-channel: beta", $content); } diff --git a/src/pocketmine/entity/Effect.php b/src/pocketmine/entity/Effect.php index 5f29f9899..67137c739 100644 --- a/src/pocketmine/entity/Effect.php +++ b/src/pocketmine/entity/Effect.php @@ -60,7 +60,7 @@ class Effect{ protected static $effects = []; public static function init(){ - $config = new Config(\pocketmine\PATH . "src/pocketmine/resources/effects.json", Config::JSON, []); + $config = new Config(\pocketmine\RESOURCE_PATH . "effects.json", Config::JSON, []); foreach($config->getAll() as $name => $data){ $color = hexdec(substr($data["color"], 3)); diff --git a/src/pocketmine/inventory/CraftingManager.php b/src/pocketmine/inventory/CraftingManager.php index 4d869c960..db486bdc2 100644 --- a/src/pocketmine/inventory/CraftingManager.php +++ b/src/pocketmine/inventory/CraftingManager.php @@ -51,8 +51,7 @@ class CraftingManager{ private $craftingDataCache; public function __construct(){ - // load recipes from src/pocketmine/resources/recipes.json - $recipes = new Config(Server::getInstance()->getFilePath() . "src/pocketmine/resources/recipes.json", Config::JSON, []); + $recipes = new Config(\pocketmine\RESOURCE_PATH . "recipes.json", Config::JSON, []); MainLogger::getLogger()->info("Loading recipes..."); foreach($recipes->getAll() as $recipe){ diff --git a/src/pocketmine/resourcepacks/ResourcePackManager.php b/src/pocketmine/resourcepacks/ResourcePackManager.php index 702da148e..df78a36ac 100644 --- a/src/pocketmine/resourcepacks/ResourcePackManager.php +++ b/src/pocketmine/resourcepacks/ResourcePackManager.php @@ -64,7 +64,7 @@ class ResourcePackManager{ } if(!file_exists($this->path . "resource_packs.yml")){ - copy($this->server->getFilePath() . "src/pocketmine/resources/resource_packs.yml", $this->path . "resource_packs.yml"); + copy(\pocketmine\RESOURCE_PATH . "resource_packs.yml", $this->path . "resource_packs.yml"); } $this->resourcePacksConfig = new Config($this->path . "resource_packs.yml", Config::YAML, []);