LuckPerms

LuckPerms

41.4k Downloads

Track command that automates inheritance across groups

Turbotailz opened this issue · 2 comments

commented

Something people often overlook is the fact that tracks don't assume inheritance. I also think that the process of making tracks and groups might be a bit tedious especially if someone is creating tracks with lots of groups (I've noticed many people are doing groups for levels 1-99, for example).

I'd like to suggest a command that could help automate this process by combining other commands into one.

Command suggestion:

/lp createtrack <trackname> [groups] [inherit]

  • [groups] would be a comma separated array of groups (e.g. helper,mod,admin) that LP would create in order from the first to last.
  • [inherit] would be a boolean, if true then it would setup inheritance across all the [groups] starting from the first one (e.g. mod inherits from helper, admin inherits from mod). Defaults to false.

So executing the following command...

/lp createtrack staff helper,mod,admin true

Would be the equivalent of doing these commands:

/lp createtrack staff
/lp creategroup helper
/lp track staff append helper
/lp creategroup mod
/lp group mod parent add helper
/lp track staff append mod
/lp creategroup admin
/lp group admin parent add mod
/lp track staff append admin

commented

In the meantime, I have put together this web app which should help anyone create a track of inherited groups:

https://turbotailz.github.io/luckperms-group-generator/

commented

I think it's probably not worth adding this convenience in the form of a command now the web editor has it built in!