Solved Getting a plugin through a Permission object

Discussion in 'Plugin Development' started by Cirno, Mar 13, 2014.

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

    Cirno

    I'm attempting to make my own permissions plugin and decided to use the attachment API to handle the gritty internal stuff. However, I noticed there isn't a way to retrieve a plugin a specific permission belongs to. A solution that I came up with is to get the permission object and check all plugins to see if that plugin has that permission. However, this would be vastly inefficient, as some servers can run up to 70+ plugins, most of which likely have double-digit numbers of child nodes.

    Is there a workaround to this, or is looping the only solution?

    edit: Nevermind; just decided to pass my own plugin as the argument for addAttachment
     
Thread Status:
Not open for further replies.

Share This Page