Remove USE_PARAMETER #35

Merged
kske merged 4 commits from f/remove-use-parameter into develop 2022-01-13 14:40:14 +01:00
1 changed files with 3 additions and 2 deletions
Showing only changes of commit 3aef7d5bcb - Show all commits

View File

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