package in.twizmwaz.cardinal.module.modules.rage;

import in.twizmwaz.cardinal.match.Match;
import in.twizmwaz.cardinal.module.ModuleBuilder;
import in.twizmwaz.cardinal.module.ModuleCollection;

public class RageBuilder implements ModuleBuilder {

    @Override
    public ModuleCollection load(Match match) {
        ModuleCollection results = new ModuleCollection();
        if (match.getDocument().getRootElement().getChild("rage").getName().equals("rage")) {
            results.add(new Rage());
        }
        return results;
    }


}



@@ -187,16 +187,42 @@
 lection;
+%0Aimport org.jdom2.Element;
 %0A%0Apublic
@@ -401,12 +401,31 @@
     
-if (
+for (Element element : 
 matc
@@ -469,45 +469,111 @@
 hild
-(%22rage%22).getName().equals(%22rage%22)) %7B%0A
+ren())%7B%0A            if (element.getName().equals(%22rage%22))%0A                System.out.println(%221%22);%0A    
     
@@ -643,16 +643,14 @@
 ts;%0A
+
     %7D%0A
-%0A%0A
 %7D%0A%0A%0A

Fix NPE with RageBuilder