Package net.ae97.totalpermissions.permission

Examples of net.ae97.totalpermissions.permission.PermissionBase


    }

    @Override
    public boolean groupAdd(String world, String group, String permission) {
        try {
            PermissionBase permGroup = manager.getGroup(group);
            permGroup.addPerm(permission, world);
            return true;
        } catch (IOException ex) {
            plugin.getLogger().log(Level.SEVERE,
                    String.format("[%s] An error occured while saving perms", totalperms.getDescription().getName()), ex);
            return false;
View Full Code Here


    }

    @Override
    public boolean groupRemove(String world, String group, String permission) {
        try {
            PermissionBase permGroup = manager.getGroup(group);
            permGroup.remPerm(permission, world);
            return true;
        } catch (IOException ex) {
            plugin.getLogger().log(Level.SEVERE,
                    String.format("[%s] An error occured while saving perms", totalperms.getDescription().getName()), ex);
            return false;
View Full Code Here

        return user;
    }

    private PermissionGroup getGroup(String name) {
        PermissionManager manager = totalPermissions.getManager();
        PermissionGroup group = manager.getGroup(name);
        return group;
    }
View Full Code Here

        setGroupInfo(world, group, node, value);
    }

    private PermissionUser getUser(String name) {
        PermissionManager manager = totalPermissions.getManager();
        PermissionUser user = manager.getUser(name);
        return user;
    }
View Full Code Here

        }
    }

    @Override
    public boolean playerInGroup(String world, String player, String group) {
        PermissionUser user = manager.getUser(player);
        List<String> groups = user.getGroups(world);
        return groups.contains(group);
    }
View Full Code Here

    }

    @Override
    public boolean playerAddGroup(String world, String player, String group) {
        try {
            PermissionUser user = manager.getUser(player);
            user.addGroup(group, world);
            return true;
        } catch (IOException ex) {
            plugin.getLogger().log(Level.SEVERE,
                    String.format("[%s] An error occured while saving perms", totalperms.getDescription().getName()), ex);
            return false;
View Full Code Here

    }

    @Override
    public boolean playerRemoveGroup(String world, String player, String group) {
        try {
            PermissionUser user = manager.getUser(player);
            user.remGroup(group, world);
            return true;
        } catch (IOException ex) {
            plugin.getLogger().log(Level.SEVERE,
                    String.format("[%s] An error occured while saving perms", totalperms.getDescription().getName()), ex);
            return false;
View Full Code Here

        }
    }

    @Override
    public String[] getPlayerGroups(String world, String player) {
        PermissionUser user = manager.getUser(player);
        List<String> groups = user.getGroups(world);
        if (groups == null) {
            groups = new ArrayList<String>();
        }
        return groups.toArray(new String[groups.size()]);
    }
View Full Code Here

TOP

Related Classes of net.ae97.totalpermissions.permission.PermissionBase

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.