Vault

Vault

7M Downloads

Checking For Permissions Doesn't Work.

olliestanley opened this issue ยท 1 comments

commented

@Sleaker
@MilkBowl

So, my code looks like this (Yes I have got the boolean setupPermissions() in the main class):

    // Permission is imported from net.milkbowl.vault.permission.Permission
    private Permission perms;

public void addBounty(Player Issuer,String Amount,String Target,String City){
    if (perms.hasPermission(Issuer, "ragemod.bounty.add.normal")) {
        Bounty temp = new Bounty();
        temp.setAmount(Integer.parseInt(Amount));
        temp.setPlayerName(Target);
        temp.setBountyGiver(Issuer.getName());
        temp.setCity(City);
        this.oab.getBH(City).addBounty(temp);
        Issuer.sendMessage(ChatColor.GREEN + "Bounty added!");
    } else {
        Issuer.sendMessage("You don't have permission to do that!");
    }
}

The part with the error is hasPermission, it says it is undefined for the type Permission

commented

Wait, it's been changed to has / playerHas / groupHas right? Might wanna update that in the README.