How to create a plugin to restrict file transfer to a specific users or user group/s?

I would like to build a plugin to restrict file transfer to a specific users or user group/s. I’m quite new to openfire and would like any assistance.i’m currently using openfire 3.6.4