Package de.bananaco.bpermissions.api

Examples of de.bananaco.bpermissions.api.User.calculateEffectivePermissions()


    @Override
    public Set<String> hasOfflinePermissions(String player, Set<String> perms) {
        HashSet<String> hasperms = new HashSet<String>();
        User usr = wm.getDefaultWorld().getUser(player);
        if(usr != null) {
            try { usr.calculateEffectivePermissions(); } catch (Exception x) {}
            Map<String,Boolean> p = usr.getMappedPermissions();
            for (String pp : perms) {
                String permval = name + "." + pp;
                Boolean v = p.get(permval);
                if (v != null) {
View Full Code Here


    public boolean hasOfflinePermission(String player, String perm) {
        boolean rslt;
        String permval = name + "." + perm;
        User usr = wm.getDefaultWorld().getUser(player);
        if(usr != null) {
            try { usr.calculateEffectivePermissions(); } catch (Exception x) {}
            if(usr.getMappedPermissions().containsKey(permval)) {
                rslt = usr.hasPermission(permval);
            }
            else {
                Boolean v = pd.get(permval);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.