@EventHandler(priority=EventPriority.LOW, ignoreCancelled=true)
	private void onEntitySpawn(EntitySpawnEvent event)
	{
		// Check per-chunk limits
		for (GroupSettings settings : mChunkGroups)
		{
			if (!settings.matches(event.getEntity()))
				continue;
			
			// Prevent spawning if limit is exceeded
			Chunk chunk = event.getLocation().getChunk();
			int count = 0;
			for (Entity ent : chunk.getEntities())
			{
				if (settings.matches(ent))
					++count;
			}
			
			if (count + 1 > settings.getMaxEntities())
				event.setCancelled(true);
		}
	}