Solved permission question: Default: true

Discussion in 'Plugin Development' started by james137137, May 18, 2013.

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

    james137137

    I'm trying to add a permission in my plugin.yml. My aim is to have a permission "FactionChat.FactionChat" but everyone by default has it, where the server admin won't have to directly give it. however it would be possible to -negate it to remove the permission

    This is what I have done so far. but it fails to work and the server admin must give the perrmision for player.haspermission(); to output true.

    Is there a way to check if a permission is negated or something???


    FactionChat.FactionChat:
    description: Allows player to send and receive messages from their Factions.
    default: true
    FactionChat.AllyChat:
    description: Allows player to send and receive messages from their ally Factions
    default: true
     
  2. Offline

    TheE

    Since permissions can only have two states, true and false, the normal hasPermission() methods already checks if the permission is negated, so to speak.

    As for your problem, permissions are case sensitive. Maybe you checked for 'factionchat.allowchat' in your code?

    Edit: Also, you should not rely on PermissionsEx when testing.
     
Thread Status:
Not open for further replies.

Share This Page