diff --git a/src/main/java/net/citizensnpcs/command/CommandManager.java b/src/main/java/net/citizensnpcs/command/CommandManager.java index 9f16288e1..6fd77a8ac 100644 --- a/src/main/java/net/citizensnpcs/command/CommandManager.java +++ b/src/main/java/net/citizensnpcs/command/CommandManager.java @@ -127,7 +127,7 @@ public class CommandManager { methodArgs[0] = context; for (Annotation annotation : registeredAnnotations.get(method)) { - CommandAnnotationProcessor processor = annotationProcessors.get(annotation.getClass()); + CommandAnnotationProcessor processor = annotationProcessors.get(annotation.annotationType()); processor.process(sender, context, annotation, methodArgs); } @@ -356,7 +356,7 @@ public class CommandManager { List annotations = Lists.newArrayList(); for (Annotation annotation : method.getDeclaringClass().getAnnotations()) { - Class annotationClass = annotation.getClass(); + Class annotationClass = annotation.annotationType(); if (annotationProcessors.containsKey(annotationClass)) annotations.add(annotation); } @@ -367,7 +367,7 @@ public class CommandManager { Iterator itr = annotations.iterator(); while (itr.hasNext()) { Annotation previous = itr.next(); - if (previous.getClass() == annotationClass) { + if (previous.annotationType() == annotationClass) { itr.remove(); } }