Hey, How can i add an Array of items to the players inventory? PHP: $items_array = (array) $config->get($args[0].".items"); //gets the array of items from configforeach($items_array as $items){ //loops though the array $player->getInventory()->addItem(Item::get($items, 0, 1)); //supposed to (but not work) give all the items to the player} I get no error but the code doesn't give the player any of the items in the array.[/PHP]
just moments after posting i changed: PHP: $config->get() TO PHP: $config->getNested() and it worked... i feel stupid rn lol