Permission won't change

Discussion in 'Plugin Development' started by Laekh, Oct 17, 2012.

Thread Status:
Not open for further replies.
  1. Hello guys,

    I wanted to change a permission with a command, but it won't change it.

    I'm using Vault, by the way.

    This is the code that gets executed (I confirmed it being executed)
    Code:
    perms.playerAdd(player, "randompermission");
    
    This is the code I use to check it:

    Code:
    if(cmd.getName().equalsIgnoreCase("check")) {
    if(!sender.hasPermission("randompermission")) {
    sender.sendMessage("You DO NOT have this permission");
    } else {
    sender.sendMessage("You have this permission");
    }
    return true;
    }
    
    perms info:

    Code:
    import net.milkbowl.vault.permission.Permission;
     
    static Permission permission;
    public static Permission perms = null;
     
        private boolean setupPermissions() {
            RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class);
            perms = rsp.getProvider();
            return perms != null;
        }
    
    (Yes the Vault Jar is added correctly to my project)

    setupPermissions is executed in onEnable.

    That's all I have, and it won't change it.

    Do I have to add anything to a yml file or anything?
    All sources I found to study from don't use yml files for their permissions when using vault, but I might be wrong.

    Thank you.

    Kind regards,
    Cupcakes.

    Bump.. :c

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 29, 2016
  2. 66 views and not a single person able to help me out with this..?
    I've been searching literally for hours..
    Close to giving up on this plugin.. sigh..
     
  3. Day 3:
    Still looking for what I'm doing wrong, tried a thousand different things and nothing seemed to work.
    Still not a living soul helping me out.
     
  4. can you try another permissions plugin
    maybe 1 permissions plugin is not fully compatible with vault
     
Thread Status:
Not open for further replies.

Share This Page