Checking if a player has permission for a command?

Discussion in 'Plugin Development' started by JPG2000, Apr 23, 2015.

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

    JPG2000

    Hello,

    I am wondering how to check if a player has permission for a command. Obviously I can use the hasPermission method, however I want to check if a player has permission for a command, not a permission. Because I don't know every permission for every command, and I want to do something special when a player doesn't have permission for any command.

    Do you guys have any ideas? I'm stuck
     
  2. Offline

    teej107

    @JPG2000 seeing as there is the hasPermission method, it's next to impossible without other modifications. The only way to see what permission a command has is through the plugin yml. Plugins don't even have to use it though. They can just use the hasPermission method.
     
  3. Offline

    JPG2000

    Your totally right, I never thought of it that way. Thanks for your input.
     
  4. Offline

    1Rogue

    teej107 and Rocoty like this.
  5. Offline

    teej107

    Totally forgot about getting registered permissions that way :p
     
Thread Status:
Not open for further replies.

Share This Page