LuckPerms

LuckPerms

41.4k Downloads

Context parsing in commands

XiaoJie-150 opened this issue ยท 1 comments

commented

Description

I personally recommend changing the format of world=world world=world_the_emd to the format of world=world,world_the_end, for example: lp user test permission set test.test true world=world,world_the_end, the same for others, which can greatly shorten write time

Proposed Behaviour

The effect remains the same as usual, but the writing method has been modified. The code does not need to judge the context key many times, just judge it once, and then use split(",") to get the content behind the context as an array, and finally traverse the array Just

Extra Details

No response

commented

What if you want a comma in the value of a context? :/

It's a nice idea, but to avoid breaking existing workflows, I think it is probably better off staying as it is