Remove USE_PARAMETER #35

Merged
kske merged 4 commits from f/remove-use-parameter into develop 2022-01-13 14:40:14 +01:00
Showing only changes of commit 3aef7d5bcb - Show all commits

View File

@ -57,7 +57,8 @@ public final class ReflectiveEventHandler implements EventHandler {
? method.getAnnotation(Priority.class).value() ? method.getAnnotation(Priority.class).value()
: defPriority; : defPriority;
// Allow access if the method is non-public // Try to allow access if the method is not accessible
if (!method.canAccess(Modifier.isStatic(method.getModifiers()) ? null : listener))
method.setAccessible(true); method.setAccessible(true);
} }