Package de.bananaco.permissions.interfaces

Examples of de.bananaco.permissions.interfaces.PermissionSet


    public boolean playerAdd(String world, String player, String permission) {
        if (world == null) {
            return false;
        }

        PermissionSet set = perms.getPermissionSet(world);
        if (set == null) {
            return false;
        }

        set.addPlayerNode(permission, player);
        return true;
    }
View Full Code Here


    public boolean playerRemove(String world, String player, String permission) {
        if (world == null) {
            return false;
        }

        PermissionSet set = perms.getPermissionSet(world);
        if (set == null) {
            return false;
        }

        set.removePlayerNode(permission, player);
        return true;
    }
View Full Code Here

    public boolean groupHas(String world, String group, String permission) {
        if (world == null) {
            return false;
        }

        PermissionSet set = perms.getPermissionSet(world);
        if (set == null) {
            return false;
        }

        if (set.getGroupNodes(group) == null) {
            return false;
        }

        return set.getGroupNodes(group).contains(permission);
    }
View Full Code Here

    public boolean groupAdd(String world, String group, String permission) {
        if (world == null) {
            return false;
        }

        PermissionSet set = perms.getPermissionSet(world);
        if (set == null) {
            return false;
        }

        if (set.getGroupNodes(group) == null) {
            return false;
        }

        set.addNode(permission, group);
        return true;
    }
View Full Code Here

    public boolean groupRemove(String world, String group, String permission) {
        if (world == null) {
            return false;
        }

        PermissionSet set = perms.getPermissionSet(world);
        if (set == null) {
            return false;
        }

        if (set.getGroupNodes(group) == null) {
            return false;
        }

        set.removeNode(permission, group);
        return true;
    }
View Full Code Here

    public boolean playerInGroup(String world, String player, String group) {
        if (world == null) {
            return false;
        }

        PermissionSet set = perms.getPermissionSet(world);
        if (set == null) {
            return false;
        }

        if (set.getGroups(player) == null) {
            return false;
        }

        return set.getGroups(player).contains(group);
    }
View Full Code Here

    public boolean playerAddGroup(String world, String player, String group) {
        if (world == null) {
            return false;
        }

        PermissionSet set = perms.getPermissionSet(world);
        if (set == null) {
            return false;
        }

        if (set.getGroupNodes(group) == null) {
            return false;
        }

        set.addGroup(player, group);
        return true;
    }
View Full Code Here

    public boolean playerRemoveGroup(String world, String player, String group) {
        if (world == null) {
            return false;
        }

        PermissionSet set = perms.getPermissionSet(world);
        if (set == null) {
            return false;
        }

        set.removeGroup(player, group);
        return true;
    }
View Full Code Here

    public String[] getPlayerGroups(String world, String player) {
        if (world == null) {
            return null;
        }

        PermissionSet set = perms.getPermissionSet(world);
        if (set == null) {
            return null;
        }

        List<String> groups = set.getGroups(player);
        return groups == null ? null : groups.toArray(new String[0]);
    }
View Full Code Here

    public String getPrimaryGroup(String world, String player) {
        if (world == null) {
            return null;
        }

        PermissionSet set = perms.getPermissionSet(world);
        if (set == null) {
            return null;
        }

        List<String> groups = set.getGroups(player);
        if (groups == null || groups.isEmpty()) {
            return null;
        } else {
            return groups.get(0);
        }
View Full Code Here

TOP

Related Classes of de.bananaco.permissions.interfaces.PermissionSet

Copyright © 2018 www.massapicom. 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.