mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Start using webmozart/pathutil for joining paths (#4287)
This commit is contained in:
@ -26,9 +26,9 @@ namespace pocketmine\inventory;
|
||||
use pocketmine\item\Durable;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\utils\SingletonTrait;
|
||||
use Webmozart\PathUtil\Path;
|
||||
use function file_get_contents;
|
||||
use function json_decode;
|
||||
use const DIRECTORY_SEPARATOR;
|
||||
|
||||
final class CreativeInventory{
|
||||
use SingletonTrait;
|
||||
@ -37,7 +37,7 @@ final class CreativeInventory{
|
||||
private $creative = [];
|
||||
|
||||
private function __construct(){
|
||||
$creativeItems = json_decode(file_get_contents(\pocketmine\RESOURCE_PATH . "vanilla" . DIRECTORY_SEPARATOR . "creativeitems.json"), true);
|
||||
$creativeItems = json_decode(file_get_contents(Path::join(\pocketmine\RESOURCE_PATH, "vanilla", "creativeitems.json")), true);
|
||||
|
||||
foreach($creativeItems as $data){
|
||||
$item = Item::jsonDeserialize($data);
|
||||
|
Reference in New Issue
Block a user