Skip to content

Commit

Permalink
Properly update classNode access flag (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
SirYwell authored Dec 21, 2023
1 parent 8383bd6 commit ec01e75
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public boolean transform(ClassNode classNode, Type classType) {
} else {
LOGGER.debug(EVENTBUS, "Transforming @SubscribeEvent method to public {}.{}", classNode.name, method.name);
int access = classNode.access & ~(Opcodes.ACC_PRIVATE | Opcodes.ACC_PROTECTED) | Opcodes.ACC_PUBLIC;
if (method.access != access) {
method.access = access;
if (classNode.access != access) {
classNode.access = access;
changed = true;
}

Expand Down

0 comments on commit ec01e75

Please sign in to comment.