mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 18:45:29 +01:00
Fix usage of getClass instead of annotationType
This commit is contained in:
parent
84d7bd1cf0
commit
56925a131b
@ -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<Annotation> annotations = Lists.newArrayList();
|
||||
for (Annotation annotation : method.getDeclaringClass().getAnnotations()) {
|
||||
Class<? extends Annotation> annotationClass = annotation.getClass();
|
||||
Class<? extends Annotation> annotationClass = annotation.annotationType();
|
||||
if (annotationProcessors.containsKey(annotationClass))
|
||||
annotations.add(annotation);
|
||||
}
|
||||
@ -367,7 +367,7 @@ public class CommandManager {
|
||||
Iterator<Annotation> itr = annotations.iterator();
|
||||
while (itr.hasNext()) {
|
||||
Annotation previous = itr.next();
|
||||
if (previous.getClass() == annotationClass) {
|
||||
if (previous.annotationType() == annotationClass) {
|
||||
itr.remove();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user