Package com.dthielke.starburst

Examples of com.dthielke.starburst.Group


    @Override
    public boolean groupAdd(String world, String group, String permission) {
        GroupManager gm = perms.getGroupManager();
        GroupSet set = gm.getWorldSet(Bukkit.getWorld(world));
        if (set.hasGroup(group)) {
            Group g = set.getGroup(group);

            boolean value = !permission.startsWith("^");
            permission = value ? permission : permission.substring(1);
            g.addPermission(permission, value, true, true);

            for (User user : gm.getAffectedUsers(g)) {
                user.applyPermissions(gm.getFactory());
            }
            return true;
View Full Code Here


    @Override
    public boolean groupHas(String world, String group, String permission) {
        GroupSet set = perms.getGroupManager().getWorldSet(Bukkit.getWorld(world));
        if (set.hasGroup(group)) {
            Group g = set.getGroup(group);
            return g.hasPermission(permission, true);
        } else {
            return false;
        }
    }
View Full Code Here

    @Override
    public boolean groupRemove(String world, String group, String permission) {
        GroupManager gm = perms.getGroupManager();
        GroupSet set = gm.getWorldSet(Bukkit.getWorld(world));
        if (set.hasGroup(group)) {
            Group g = set.getGroup(group);

            boolean value = !permission.startsWith("^");
            permission = value ? permission : permission.substring(1);

            if (g.hasPermission(permission, false)) {
                g.removePermission(permission, true);

                for (User user : gm.getAffectedUsers(g)) {
                    user.applyPermissions(gm.getFactory());
                }
                return true;
View Full Code Here

        OfflinePlayer op = Bukkit.getOfflinePlayer(player);
        GroupSet set = perms.getGroupManager().getWorldSet(Bukkit.getWorld(world));
        User user = set.getUser(op);

        if (set.hasGroup(group)) {
            Group g = set.getGroup(group);
            if (!user.hasChild(g, false)) {
                user.addChild(g, true);

                if (user.isActive()) {
                    user.applyPermissions(perms.getGroupManager().getFactory());
View Full Code Here

                return p.hasPermission(permission);
            }
        }

        GroupSet set = perms.getGroupManager().getWorldSet(Bukkit.getWorld(world));
        Group user = set.getUser(op);
        return user.hasPermission(permission, true);
    }
View Full Code Here

        OfflinePlayer op = Bukkit.getOfflinePlayer(player);
        GroupSet set = perms.getGroupManager().getWorldSet(Bukkit.getWorld(world));
        User user = set.getUser(op);

        if (set.hasGroup(group)) {
            Group g = set.getGroup(group);
            return user.hasChild(g, true);
        } else {
            return false;
        }
    }
View Full Code Here

        OfflinePlayer op = Bukkit.getOfflinePlayer(player);
        GroupSet set = perms.getGroupManager().getWorldSet(Bukkit.getWorld(world));
        User user = set.getUser(op);

        if (set.hasGroup(group)) {
            Group g = set.getGroup(group);
            if (user.hasChild(g, false)) {
                user.removeChild(g, true);

                if (user.isActive()) {
                    user.applyPermissions(perms.getGroupManager().getFactory());
View Full Code Here

TOP

Related Classes of com.dthielke.starburst.Group

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.