LuckPerms

LuckPerms

41.4k Downloads

Convenient editing of yaml configurations

DarkFort opened this issue ยท 16 comments

commented

Make configuration editing yaml more convenient as in pex
default

commented

Worth it!)

commented

Yet to find a neat way to wrap meta, prefixes and suffixes into their own sections.
If anyone has any suggestions, feel free to open a new ticket.

commented

This has been discussed in the past many times, and the current system is used because it offers us the ability to assign each permission a context and Boolean easier than with the suggested system.

If you look at the current luckperms system, each permission for you is assign a value of true or false. But for more complex system, it will also display a server context or a world context. So they could also show server: skyblock And world: world_nether for example.

commented
commented

I have to agree with both @merjilin & @BrainStone on this matter.

Starting off @DarkFort (and yes I use to use Pex) I didn't have the need for the flexibility that Luckperms offers. But now that I know about the flexibility that Luckperms has over Pex I actually wished Luckperms came about before Pex did. In fact now I don't think I would be able to go back to Pex with my current permissions setup.

There is only one thing that I do miss with the differences between Pex and Luckperms which was brought up in #500 (comment) (re: permission load/check order with pex vs luckperms) but Luck is looking into it if you read further down in that issue.

Edit: And resolved via 28961b1

commented

All of the points raised here are valid, but I agree with @DarkFort - the layout could definitely use some improvement.

The core layout is unlikely to change, but I would like to try to at least split up standard permissions, parents and metadata. The question is how we do this in a backwards compatible manner. :)

commented

Hmmm, not entirely sure whether this is going to be too drastic a change to maintain backwards compatible. But maybe we could use contexts as the headers, and if no context is given it defaults to the global header. Under these headers, there would be the permission node along with the value.

However, it would being to look untidy when someone assigns a server context, and a world context like shown below. But, considering file based storage such as yaml and json shouldn't be used for cross-server functionality (Unless someone has a thing for symlinks), I'm not too sure how that would be handled.

permissions:
    global:
    - essentials.fly: true
    - essentials.gamemode: true
    - essentials.god: true
    world_nether:
    - essentials.fly: false
    - essentials.god: false
    skyblock:
        world_end:
        - essentials.god: false
commented

No way to determine the context key in these instances.

commented

I'm the user who is comfortable editing the configuration manually, not by commands.

commented

And this configuration is not very convenient

commented

I liked the idea of โ€‹โ€‹@Ryan-Haytree

commented

@DarkFort I don't want to be mean, but do you know about the edit feature?

commented

@BrainStone I'm not comfortable with this, I'm used to editing configs

commented

@lucko Not sure if your commit is final, but on LuckPerms dev 376, some groups got automatically converted while others are still in a legacy format.

Example.

Admin group.

name: admin
permissions:
- '*'
- meta.weight.2
- prefix.10.&c
- weight.10
parents:
- senior-mod

Senior-mod group.

name: senior-mod
permissions:
- essentials.tppos
- group.moderator
- weight.9
- prefix.9.&d
- meta.weight.3
- chatcontrol.groups.smod
commented

The conversion happens as other changes are made.

If you run something like /lp group senior-mod permission set test true - it will trigger an update to the file, and will save the parent in a new format.

commented

This ticket is still open as I'm trying to figure out an elegant way to to split up prefixes/suffixes/meta.

(or if it's even worth doing so)