Permissions

Discussion in 'Plugin Development' started by adam2255, Oct 11, 2012.

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

    adam2255

    Idk what I`am doing wrong :confused:

    Plugin
    PHP:
     if(!sender.hasPermission("prenumerata.redaktor"))
    {
    sender.sendMessage((new StringBuilder(String.valueOf(pre))).append("Message ").toString()); }
    Permissions.yml

    PHP:
    groups:
      default:
        default: 
    true
        permissions
    :
        - 
    todolist.*
        - 
    prenumerata.redaktor
     
    Plugin.yml

    PHP:
    permissions:
       
        
    prenumerata.redaktor:
            
    descriptionBlach Blach Blach
            
    default: op

    I want to show a message when the group has permissions.
     
  2. Offline

    LukeSFT

    What happens?
    (error, nothing...?)

    change to:
    PHP:
    permissions:
      
    prenumerata.*:
        
    descriptionblabla
        children
    :
          
    prenumerata.redaktortrue
      prenumerata
    .redaktor:
        
    descriptionBlach Blach Blach
        
    default: op
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 29, 2016
  3. Offline

    adam2255

    Stil nothing shows , no errors ;/
     
  4. permissions.yml (the one at the server rout) should be configured on an other way than what yopu did, the stucture is verry unclear
     
  5. Offline

    Ammar Askar

    You want to send them the message if they have the permission yet you do

    if(!sender.hasPermission("prenumerata.redaktor"))

    That "!" basically means not so you're checking if they don't have that permission. Fix your logic.
     
Thread Status:
Not open for further replies.

Share This Page