LuckPerms

LuckPerms

41.4k Downloads

Have world section for permission nodes YAML?

kmecpp opened this issue ยท 1 comments

commented

I'm using YAML for data storage and when I create permission nodes with commands for specific worlds it gets written to the group file like this:

- essentials.kits.color:
    value: true
    world: survival
- essentials.kits.firework:
    value: true
    world: survival
- essentials.kits.tools:
    value: true
    world: survival
- essentials.back:
    value: true
    world: survival
- essentials.back.ondeath:
    value: true
    world: survival
- essentials.suicide:
    value: true
    world: survival
- essentials.sethome:
    value: true
    world: survival
...

Is there any way to specify all the permissions in one section for a specific world rather than repeating the world and its value every single time? For example:

worlds:
    survival:
        - essentials.kits.color:
        - essentials.kits.firework:
        - essentials.kits.tools:
        - essentials.back:
        - essentials.back.ondeath:
        - essentials.suicide:
        - essentials.sethome:
    ...
commented

Yes, you can do it by adding permissions which start with luckperms.batch, and then adding the child nodes under permissions below the batch node.

permissions:
- luckperms.batch1:
    value: true
    world: survival
    permissions:
      - essentials.kits.color
      - essentials.kits.firework
      - essentials.kits.tools

A dedicated world section wouldn't make any sense, since LuckPerms supports an arbitrary amount of "contexts", such as server, world, etc.