kezz101/HarryPotterSpells — pull request #52 by evilmidget38 (2012-08-12 23:18:50+00:00)
Title: New command system and fix.  No known 

Added in new command system, which drastically simplifies commands. To add a new command henceforth, all you have to do is:

- Create a class that extends HPCommand which exactly matches the name of your command.
- Add in the inherited run method.
- Add your command to the array of commands inside of HPCommandDispatcher. This is done inside of the constructor(to avoid NPE's).
- Register your command inside of the HarryPotterSpells class, via getCommand("").setExecutor(dispatcher);
- Add your command to the plugin.yml. Make sure to specify the permission field if you want a permission node for it.

Also fixed a confirmed NPE(I encountered it while testing this), which is caused by the possibility of PlayerInteractEvent's getClickedBlock method to return null. Fix is tested and confirmed, as is the spell system.