Skip to content

Commit

Permalink
Fixed registerevents() method for UpdateListener
Browse files Browse the repository at this point in the history
  • Loading branch information
y0gm4 committed Oct 4, 2022
1 parent 28bfde6 commit fd4bd24
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ else if(event instanceof CallbackListener){
throw new AnnotationMissingException(String.format("Callback.class annotation is missing for %s class", clazz.getName()));
Callback callback = clazz.getAnnotation(Callback.class);
query.put(callback, clazz);

if(clazz.isAnnotationPresent(Permission.class))
try {
Permission permission = clazz.getAnnotation(Permission.class);
Expand Down Expand Up @@ -120,7 +119,7 @@ public void registerEvents(String packagePath){
.stream()
.filter(Listener.class::isAssignableFrom)
.filter(clazz -> clazz.isAnnotationPresent(Command.class) ||
clazz.isAnnotationPresent(Callback.class))
clazz.isAnnotationPresent(Callback.class) || Listener.class.isAssignableFrom(clazz))
.map(clazz -> {
Listener listener = null;
try {
Expand Down

0 comments on commit fd4bd24

Please sign in to comment.