Examples of PermissionList


Examples of com.forgeessentials.api.permissions.Zone.PermissionList

    // -- Utilities
    // ------------------------------------------------------------

    public PermissionList getRegisteredPermissions()
    {
        PermissionList perms = (PermissionList) rootZone.getGroupPermissions(IPermissionsHelper.GROUP_DEFAULT).clone();
        for (Entry<String, String> perm : rootZone.getGroupPermissions(IPermissionsHelper.GROUP_OPERATORS).entrySet())
            perms.put(perm.getKey(), perm.getValue());
        return perms;
    }
View Full Code Here

Examples of com.forgeessentials.api.permissions.Zone.PermissionList

                        continue;
                    }
                    UserIdent ident = new UserIdent(uuid, username);

                    // Load permissions
                    PermissionList permissions = zone.getOrCreatePlayerPermissions(ident);
                    for (Entry permission : p.entrySet())
                    {
                        permissions.put((String) permission.getKey(), (String) permission.getValue());
                    }
                }
                catch (IllegalArgumentException | IOException e)
                {
                    OutputHandler.felog.severe("Error reading permissions from " + path.getAbsolutePath());
                }
            }

        }

        if (groupsPath.exists())
        {
            for (File file : groupsPath.listFiles(permissionFilter))
            {
                try
                {
                    Properties p = new Properties();
                    p.load(new BufferedInputStream(new FileInputStream(file)));

                    // Get group
                    String groupName = file.getName().substring(0, file.getName().length() - PERMISSION_FILE_EXT.length());

                    // Load permissions
                    PermissionList permissions = zone.getOrCreateGroupPermissions(groupName);
                    for (Entry permission : p.entrySet())
                    {
                        permissions.put((String) permission.getKey(), (String) permission.getValue());
                    }
                }
                catch (IllegalArgumentException | IOException e)
                {
                    OutputHandler.felog.severe("Error reading permissions from " + path.getAbsolutePath());
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.