1.15.2 LuckyPerms API - how to set a permanent global permission?

Discussion in 'Spigot Plugin Development' started by LEOcab, Jan 19, 2020.

  1. So my plugin needs to assign permissions. I've been using LuckPerms for a while so I'm not a total noob with it. I know about contexts and all that and for the most part I've used it successfully.

    But I have one problem - every time i assign a permission, it only stays on until the user logs out. So right now I have 2 plugins that check UserJoinEvent to fix all un-granted permissions. It works but it's not a permanent solution. In my mind what i need to do is get the global context from the user, but I can't seem to find the method for that.

    This is what I have:
    Code (Java):
    User user = Plugin.Permissions.getUserManager().getUser(playerId);
    Node node = Plugin.Permissions.getNodeFactory().newBuilder(permString)
    Thanks in advance!!
  2. Luckperms 4 or 5?
  3. Hey im new in programming in Java Spigot and i have a question about how to set a user a permission and how to remove these?

    I have implemented the LuckPerms plugin to my project libraries already. I don't find any beginner friendly tutorial for this :)
  4. I'd recommend making your own thread.

    EDIT: look at this https://luckperms.net/wiki/Developer-API-Usage
    • Agree Agree x 3