BukkitPerms help?

Discussion in 'Plugin Development' started by badbh222, Aug 24, 2011.

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

    badbh222

    So I'm a bit stuck, trying to work out how to use BukkitPerms properly. :confused:

    Say I have a chat plugin, and want only people with permission to talk, then I use a "player.hasPermission("mychatplugin.chat")" in a player listener, that's fairly simple, but... what if I want that to default to true (anyone being able to chat), if the server is not using permissions at all, but default to false if the server is using permissions, but that player doesn't have the node...?


    Server using permissions > Player has permission node > Allowed to chat
    Server using permissions > Player doesn't have permission node > Not allowed to chat
    Server not using permissions > Player doesn't have permission node (Obviously) > Allowed to chat


    If anyone can understand this post, Congrats, and if anyone can tell me I'm missing something really simple, Thank you!
     
  2. Offline

    nisovin

    You shouldn't be trying to set two different defaults based on whether they have permissions or not. It doesn't matter. Just set one default that applies for everyone. If a server has a permissions plugin, they can change from the defaults.
     
  3. Offline

    badbh222

    @nisovin Hmmm, seems like more work for server admins, needing to enter even the nodes they don't want the user/group to have.

    But, I suppose that will work... Thanks. :)
     
Thread Status:
Not open for further replies.

Share This Page