Luckperms: Permissions for subcommands

Created on 13 Sep 2017  路  5Comments  路  Source: lucko/LuckPerms

Is it currently possible to set permissions for subcommands that don't each have their own node?
For example:

Command | Effect
--------|-------
/weather set rain | sets the weather
/weather get | prints information about the weather

Now, some mods would define a node for each subcommand:
somemod.command.weather.set
somemod.command.weather.get

But some mods only define a node for the parent command:
somemod.command.weather

Is it possible to allow e.g. /weather get but _not_ /weather set even when there is only one node?
Might this be possible to implement in principle, or is it not worth the hassle?

question

Most helpful comment

That is the job of the plugins, not the permission plugins.

All 5 comments

That is the job of the plugins, not the permission plugins.

Regardless of who's job it is, from the fact that this was closed after your answer I assume it's either impossible then or simply not worth the hassle.
Ah well, at least the uncertainty is gone. Was just curious is all. :)

It's impossible to make it work reliably. You have to know that permission checks have to be put into the code manually. You'd have to intercept the command and evaluate it and construct a permission from it which would be riddled with corner cases etc.

In short the plugin itself has to add these fine grained checks. The permission plugin can do nothing about it

Sorry, I was under the impression the reply above answered your question, so closed the ticket. :)

But basically, as has been said already, it's down to the individual plugins on the server to run and use their own permission checks.

The permissions plugin, (LuckPerms in this case) just replies to the lookup queries. It doesn't implement any checks itself.

Thanks for the more detailed explanation! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

netherstar picture netherstar  路  4Comments

chillerkraft picture chillerkraft  路  3Comments

Aberdeener picture Aberdeener  路  3Comments

hohserg1 picture hohserg1  路  3Comments

Zekrin picture Zekrin  路  3Comments