Refactor onCommand

The onCommand Function had a lot of duplicated code segments and extra if/else checks that hampered its' readability. Fixed by factoring out the most common checks, deleting copypasta, and utilizing a switch statement.

I also changed the version in pom.xml to 1.3.7-dev to differentiate from released code.