The module docs are here - https://docs.blesta.com/display/dev/Modules
And, all modules that ship with Blesta are open, so they serve as good examples. I'd look at one that's most similar to what you're trying to accomplish.
you have to chown -R apache:apache /var/www/html/plugins/live_chat/* (please replace /var/www/html with where you installed blesta your server root)
I have blesta installed in /var/www/html/ so that is where I chowned the permissions
this whole issue is because of the permissions issue as it is by default owned by root and apache user(httpd is running under) doesn't have permission to access it so I chowned it to fix permissions and it works now.
@PauloV you might need to put this as a note for me and everyone else that are dummies that didn't think of doing this and why this was stopping the plugin from working.