Added a dynamic way to register commands

Register a command but creating a object of this class(don't forget the setJavaPlugin method, otherwise you will get a error