LuckPerms

LuckPerms

41.4k Downloads

Help with the API

DeinPlay opened this issue ยท 2 comments

commented

Hello,

i am trying to use the API but I don't know how to add a permission to a user + the permission should be timed to 24h.
Can anyone help me?

Thanks!

commented

Have a look here: https://github.com/lucko/LuckPerms/wiki/Developer-API
Also the Javadocs are very helpful.

commented

You can use the setExpiry method to specify how long a permission should last for.

https://static.javadoc.io/me.lucko.luckperms/luckperms-api/4.3/me/lucko/luckperms/api/Node.Builder.html#setExpiry-long-java.util.concurrent.TimeUnit-

e.g. for your 24h example:

.setExpiry(24, TimeUnit.HOURS)

Everything else you need to know is covered on the wiki page linked by @BrainStone