Disclaimer: I've not tried anything, only read the code and wrote this from memory.
If this datapack is run on a server at world creation, nobody would get the items unless they join within half a second of its initial start and are online at the moment it triggers. Instead of a global thing, you could do something like this:
execute as @a[tag=!elytra] run function icarus/items
And then as a file items.mcfunction:
give @s elytra{Unbreakable:1}
give @s firework_rocket{Fireworks:{Flight:3}} 64
tag @s add elytra
This way everyone would get the items when they first join. This also improves performance (but that shouldn't be a big deal currently either) and makes the code a bit cleaner. You can also completely remove the init function then.
Disclaimer: I've not tried anything, only read the code and wrote this from memory. If this datapack is run on a server at world creation, nobody would get the items unless they join within half a second of its initial start and are online at the moment it triggers. Instead of a global thing, you could do something like this:
And then as a file
items.mcfunction
:This way everyone would get the items when they first join. This also improves performance (but that shouldn't be a big deal currently either) and makes the code a bit cleaner. You can also completely remove the init function then.