Need Help Unsetting Permissions

Discussion in 'Plugin Development' started by MrGamingLion66, Dec 23, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    MrGamingLion66

    Hello everyone, not to long ago I posted a thread about creating and managing permissions. However, now I have run into new issues. What I need to do is to reset all the permissions given to certain players. I have my attachments and UUIDs stored in a hash map. But I can't seem to figure out of to either terminate to PermissionAttachment or reset to permissions attached to it. Can anyone help?
     
  2. Offline

    Orange Tabby

    Hello again.
    To remove a permission attachment, it's as simple as below:
    Code:
    player.removeAttachment(attachment);
    If you want to reset a permission attachment, you can remove it and give them a new one, or you can loop through all the permissions in the attachment and remove/unset them individually.
    Code:
    permissionAttachment.getPermissions().keySet(); // Get list of all permissions
    
     
  3. Offline

    MrGamingLion66

Thread Status:
Not open for further replies.

Share This Page