Package org.anjocaido.groupmanager.permissions

Examples of org.anjocaido.groupmanager.permissions.AnjoPermissionsHandler


        }
    }

    @Override
    public String[] getGroups(String name) {
        AnjoPermissionsHandler permissionHandler = getPermissionHandler(null);
        if (permissionHandler == null) {
            return new String[0];
        }
        return permissionHandler.getGroups(name);
    }
View Full Code Here


        }

        String name = player.getName();
        World world = worldName != null ? server.getWorld(worldName) : player.getPlayer().getWorld();

        AnjoPermissionsHandler permissionHandler = getPermissionHandler(world);
        return permissionHandler != null && permissionHandler.permission(name, permission);
    }
View Full Code Here

        if (nameNotSafe(group)) {
            return false;
        }

        AnjoPermissionsHandler permissionHandler = getPermissionHandler(null);
        return permissionHandler != null && permissionHandler.inGroup(player.getName(), group);
    }
View Full Code Here

        }
    }

    @Override
    public int getPlayerInfoInteger(String worldName, String playerName, String node, int defaultValue) {
        AnjoPermissionsHandler handler;
        if (worldName == null) {
            handler = groupManager.getWorldsHolder().getWorldPermissionsByPlayerName(playerName);
        } else {
            handler = groupManager.getWorldsHolder().getWorldPermissions(worldName);
        }
        if (handler == null) {
            return defaultValue;
        }
        Integer val = handler.getUserPermissionInteger(playerName, node);
        return val != null ? val : defaultValue;
    }
View Full Code Here

        setPlayerValue(worldName, playerName, node, value);
    }

    @Override
    public int getGroupInfoInteger(String worldName, String groupName, String node, int defaultValue) {
        AnjoPermissionsHandler handler;
        if (worldName == null) {
            handler = groupManager.getWorldsHolder().getDefaultWorld().getPermissionsHandler();
        } else {
            handler = groupManager.getWorldsHolder().getWorldPermissions(worldName);
        }
        if (handler == null) {
            return defaultValue;
        }
        Integer val = handler.getGroupPermissionInteger(groupName, node);
        return val != null ? val : defaultValue;
    }
View Full Code Here

        setGroupValue(worldName, groupName, node, value);
    }

    @Override
    public double getPlayerInfoDouble(String worldName, String playerName, String node, double defaultValue) {
        AnjoPermissionsHandler handler;
        if (worldName == null) {
            handler = groupManager.getWorldsHolder().getWorldPermissionsByPlayerName(playerName);
        } else {
            handler = groupManager.getWorldsHolder().getWorldPermissions(worldName);
        }
        if (handler == null) {
            return defaultValue;
        }
        Double val = handler.getUserPermissionDouble(playerName, node);
        return val != null ? val : defaultValue;
    }
View Full Code Here

        setPlayerValue(worldName, playerName, node, value);
    }

    @Override
    public double getGroupInfoDouble(String worldName, String groupName, String node, double defaultValue) {
        AnjoPermissionsHandler handler;
        if (worldName == null) {
            handler = groupManager.getWorldsHolder().getDefaultWorld().getPermissionsHandler();
        } else {
            handler = groupManager.getWorldsHolder().getWorldPermissions(worldName);
        }
        if (handler == null) {
            return defaultValue;
        }
        Double val = handler.getGroupPermissionDouble(groupName, node);
        return val != null ? val : defaultValue;
    }
View Full Code Here

        setGroupValue(worldName, groupName, node, value);
    }

    @Override
    public boolean getPlayerInfoBoolean(String worldName, String playerName, String node, boolean defaultValue) {
        AnjoPermissionsHandler handler;
        if (worldName == null) {
            handler = groupManager.getWorldsHolder().getWorldPermissionsByPlayerName(playerName);
        } else {
            handler = groupManager.getWorldsHolder().getWorldPermissions(worldName);
        }
        if (handler == null) {
            return defaultValue;
        }
        Boolean val = handler.getUserPermissionBoolean(playerName, node);
        return val != null ? val : defaultValue;
    }
View Full Code Here

        setPlayerValue(worldName, playerName, node, value);
    }

    @Override
    public boolean getGroupInfoBoolean(String worldName, String groupName, String node, boolean defaultValue) {
        AnjoPermissionsHandler handler;
        if (worldName == null) {
            handler = groupManager.getWorldsHolder().getDefaultWorld().getPermissionsHandler();
        } else {
            handler = groupManager.getWorldsHolder().getWorldPermissions(worldName);
        }
        if (handler == null) {
            return defaultValue;
        }
        Boolean val = handler.getGroupPermissionBoolean(groupName, node);
        return val != null ? val : defaultValue;
    }
View Full Code Here

        setGroupValue(worldName, groupName, node, value);
    }

    @Override
    public String getPlayerInfoString(String worldName, String playerName, String node, String defaultValue) {
        AnjoPermissionsHandler handler;
        if (worldName == null) {
            handler = groupManager.getWorldsHolder().getWorldPermissionsByPlayerName(playerName);
        } else {
            handler = groupManager.getWorldsHolder().getWorldPermissions(worldName);
        }
        if (handler == null) {
            return defaultValue;
        }
        String val = handler.getUserPermissionString(playerName, node);
        return val != null ? val : defaultValue;
    }
View Full Code Here

TOP

Related Classes of org.anjocaido.groupmanager.permissions.AnjoPermissionsHandler

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.