Yes blame the "lack of documentation". Totally not your java "knowledge". You also totally did not try to implement code that has such an obvious syntax error that someone with actual java knowledge would immediately see and be able to fix.
Everything you need to do has been explained in this thread (and also the thread you linked where you stole the code from). Making this mod probably takes about 5 minutes.