Add an option to "copy" a permission's duration and use that duration in another permission
02Miki opened this issue ยท 7 comments
Allow placeholders to be parsed inside /lp commands, for example:
/lp u %player% perm set (etc)
Also possibly, add a placeholder similar to %luckperms_expiry_time_% but that can actually be used in these /lp commands (rn it parses the date with spaces, like 1d 5h 50m), but the command needs it without spaces
Thank you!
Handling placeholders is not LPs job but whatever plugin might wanna use the command itself.
So you better request it from the dev of the plugin, where you want to use it.
There is no reason for LP to actually handle placeholders, especially when it serves multiple platforms from which some do not use the same plugin (i.e. PlaceholderAPI)
There is one space where it could use placeholder support, and that is in player-run commands for dates that use an unknown (pre-set) specific date. That way, you don't have to be checking and counting the seconds to apply another permission with the same end time. I do agree that the easiest way is to do the command through a plugin which parses and runs them, but even in that case the date to expiry
placeholder needs to have an alternative with the spaces removed so LP can read the whole date once it's parsed.
I feel like this is a classic case of the XY Problem.
What's your use case? What do you want to use this for?
Edit:
- The first one seems like you want to configure some plugins that allow you to run commands. And you're looking for a way to add a player placeholder. If that's the case your proposal is actually impossible to implement in LuckPerms. As LP has no way of figuring out what player that plugin is targeting. However all of these plugins (unless made by a complete idiot or bleeding beginner) have placeholders themselves. Check their docs on how to use their placeholders
- My guess here is that you want to increase the time of a temporary permission or group assignment. Just use the built in temporary modifiers as explained on the command usage page.
We had a chat about it on discord, I need to check for a date & time of a permission, and give the same duration to another permission (the 2 perms don't get set at the same time, so the 1st could've been set 1 month ago)
So in short you don't want placeholders, you just want to be able to give a second permission that copies the expiry time another permission has?
A little tip for the future: When making feature proposals make cleary why you want something. Or better even just ask for something to satisfy your use case and if you have a proposal on how to achieve that, explain that too ;)