public LoadPermissions() {
	
		final File permissionsFolder = new File(plugin.getDataFolder(), "permissions/");
		
		if (!permissionsFolder.exists()) {
			permissionsFolder.mkdirs();
		}
		
		permissionsFile = new File(plugin.getDataFolder(), "permissions/permissions.yml");
		
		if (!permissionsFile.exists()) {
			try {
				ConfigHandle.copy(plugin.getResourceAsStream("permissions.yml"), permissionsFile);
			} catch (final IOException e) {
				e.printStackTrace();
			}
		}
		
		final FileConfiguration permissionsYaml = new YamlConfiguration();
		
		try {
			permissionsYaml.load(permissionsFile);
		} catch (final Exception e) {
			throw new IllegalStateException("Can't load permissions file!");
		}
		
		final HashMap<String, Group> groups = new HashMap<String, Group>();
		
		final Set<String> groupNames = permissionsYaml.getConfigurationSection("groups").getKeys(false);
		
		for (final String groupName : groupNames) {
			
			final boolean isDefault = permissionsYaml.getBoolean("groups." + groupName + ".default");
			
			final List<String> permissions = permissionsYaml.getStringList("groups." + groupName + ".permissions");
			
			final Set<String> flags = permissionsYaml.getConfigurationSection("groups." + groupName + ".flags").getKeys(false);
			
			final List<String> tempPerms = new ArrayList<String>();
			
			final HashMap<String, Object> tempflags = new HashMap<String, Object>();
			
			for (final String permission : permissions) {
				tempPerms.add(permission.toLowerCase());
			}
			
			for (final String flag : flags) {
				
				tempflags.put(flag, permissionsYaml.get("groups." + groupName + ".flags." + flag));
				
			}
			
			final String tag = permissionsYaml.getString("groups." + groupName + ".tag");
			
			final Group group = new Group(groupName.toLowerCase(), tag, isDefault, tempPerms, tempflags);
			
			permissions.clear();
			tempPerms.clear();
			flags.clear();
			tempflags.clear();
			
			if (isDefault) {
				PermissionData.setDefaultGroup(group);
			}
			
			groups.put(groupName.toLowerCase(), group);
			
		}
		
		PermissionData.setGroups(groups);
		
	}