diff --git a/fml/common/cpw/mods/fml/common/FMLModContainer.java b/fml/common/cpw/mods/fml/common/FMLModContainer.java index 8d63ce4d3f..2bebe7994e 100644 --- a/fml/common/cpw/mods/fml/common/FMLModContainer.java +++ b/fml/common/cpw/mods/fml/common/FMLModContainer.java @@ -220,16 +220,19 @@ public class FMLModContainer implements ModContainer { for (Annotation a : m.getAnnotations()) { - Class[] paramTypes = new Class[] { modTypeAnnotations.get(a.annotationType()) }; + if (modTypeAnnotations.containsKey(a.annotationType())) + { + Class[] paramTypes = new Class[] { modTypeAnnotations.get(a.annotationType()) }; - if (Arrays.equals(m.getParameterTypes(), paramTypes)) - { - m.setAccessible(true); - anns.put(a.annotationType(), m); - } - else - { - FMLLog.severe("The mod %s appears to have an invalid method annotation %s. This annotation can only apply to methods with argument types %s -it will not be called", getModId(), a.annotationType().getSimpleName(), Arrays.toString(paramTypes)); + if (Arrays.equals(m.getParameterTypes(), paramTypes)) + { + m.setAccessible(true); + anns.put(a.annotationType(), m); + } + else + { + FMLLog.severe("The mod %s appears to have an invalid method annotation %s. This annotation can only apply to methods with argument types %s -it will not be called", getModId(), a.annotationType().getSimpleName(), Arrays.toString(paramTypes)); + } } } }