public static EntityFilter from(ConfigurationSection section) throws InvalidConfigurationException
	{
		EntityFilter filter = new EntityFilter();
		for (String key : section.getKeys(false))
		{
			String value = section.getString(key);
			boolean include;
			if (value.equalsIgnoreCase("ignore"))
				include = false;
			else if (value.equalsIgnoreCase("include"))
				include = true;
			else
			{
				throw new InvalidConfigurationException(
						"Filter error in group " + section.getParent().getName() + " for type " + key + ": Unknown action " + value + 
						". Possible values are 'ignore', or 'include'");
			}
			
			// Try a filter category
			FilterAction action = null;
			for (FilterCategory c : FilterCategory.values())
			{
				if (c.name().equalsIgnoreCase(key))
				{
					action = new FilterAction(c, include);
					break;
				}
			}
			
			if (action == null)
			{
				// Try an entity type
				for (EntityType t : EntityType.values())
				{
					if (t.name().equalsIgnoreCase(key))
					{
						action = new FilterAction(t, include);
						break;
					}
				}
				
				if (action == null)
				{
					// No other options
					throw new InvalidConfigurationException(
							"Filter error in group " + section.getParent().getName() + ": Unknown type " + key + 
							". Possible values are " + StringUtils.join(FilterCategory.values(), ", ") + " or an entity type");
				}
			}
			
			filter.actions.add(action);
		}
		
		return filter;
	}