1.15.2 How do i find all permissions used in a plugin?

Discussion in 'Spigot Plugin Development' started by hidden1nin, Feb 22, 2020.

  1. is there a plugin i can use to see what my own plugin uses?
    ive been coding the same plugin for months and i made a terrible mistake by nnot writing down my permissions, is there an easy way to get them all listed.
     
  2. Go class by class, there is no other way
    Sorry :p
    It also happend to me in my begginings
     
  3. You could search your files for “hasPermission” to make it less tedious.
     
    • Agree Agree x 2
  4. In windows you can enable a search option to also look for strings inside files. Enable that option, go to your plugin directory and search for .hasPermission
     
  5. Your IDE should have this already, it’s likely quicker too.
     
  6. Thanks that is what i thought =(
     
    • Optimistic Optimistic x 1
  7. If you are using LuckPerms as you permissions plugin it's web interface can autocomplete permissions.
     
  8. Also how do i add perms to my plugin .yml?
     
  9. Im using pex
     
  10. You can open your plugin with zip and read plugin.yml file. Every plugin has one.
     
  11. no how do i put perms in plugin.yml whats the format
     
  12. Can be found in the wiki
     
  13. It should look something like this:
    Code (YAML):
    commands:
        command
    :
            permission
    : random.permission
    permissions
    :
        random.permission
    :
            default
    : op
    You can find it on the wiki here.