LuckPerms

LuckPerms

41.4k Downloads

New flatfile schemas

lucko opened this issue ยท 3 comments

commented

I want to change the file formats used by the YAML and JSON storage types.

The current system is very simple, but gets really messy when you have permissions with custom contexts attached.

The new layout I propose is as follows. It follows the same layout between JSON and YAML as before, with only changes in syntax.

JSON

{
    "name": "Luck",
    "uuid": "--uuid-goes-here--",
    "primaryGroup": "default",
    "permissions": {
        "some.permission": {
            "value": true
        },
        "some.other.permission": {
            "value": true,
            "server": "factions"
        },
        "some.other.permission.thing": {
            "value": true,
            "server": "factions",
            "context": {
                "gp_claim_defaults": ["WILDERNESS"]
            }
        }
    }
}

YAML

name: Luck
uuid: --uuid-goes-here--
primaryGroup: default
permissions:
  - some.permission:
      value: true
  - some.other.permission:
      value: true
      server: factions
  - some.other.permission.thing:
      value: true
      server: factions
      context:
        gp_claim_defaults:
          - WILDERNESS

Any comments / ideas are welcome.

commented

๐Ÿ‘ ๐Ÿ†

commented

Why not HOCON?
you can find it here.

commented

Too similar to JSON imo. It was suggested before but turned down on that basis.