command permissions and onCommand

Discussion in 'Plugin Development' started by werelord, Oct 22, 2011.

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


    When setting up a plugin, I defined a permission for a specific command in plugin.yml, like so:

         description: foobar
         permission: myPlugin.myCommand
    Does Bukkit automatically check that permission before it is even dispatched to the plugin?? specifically, if the player does not have the "myPlugin.myCommand" permission, the plugin.onCommand() method (or CommandExecutor handler) is never called, is this correct??

    Namely I put in checking permissions of my command before executing the command, but it doesn't seem to be working as such; instead Bukkit responds with the standard "Bukkit wants to let you access command, but bukkit cannot let you" error message.. Which makes me think Bukkit is checking the permission before my command executor is even called..
Thread Status:
Not open for further replies.

Share This Page