diff --git a/patches/api/Use-ASM-for-event-executors.patch b/patches/api/Use-ASM-for-event-executors.patch index 677d0c1d7d..830aa0c5fb 100644 --- a/patches/api/Use-ASM-for-event-executors.patch +++ b/patches/api/Use-ASM-for-event-executors.patch @@ -136,6 +136,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +import static org.objectweb.asm.Opcodes.*; + +public class ASMEventExecutorGenerator { ++ ++ private static final String EXECUTE_DESCRIPTOR = "(Lorg/bukkit/event/Listener;Lorg/bukkit/event/Event;)V"; ++ + @NotNull + public static byte[] generateEventExecutor(@NotNull Method m, @NotNull String name) { + ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS); @@ -147,7 +150,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + methodGenerator.returnValue(); + methodGenerator.endMethod(); + // Generate the execute method -+ methodGenerator = new GeneratorAdapter(writer.visitMethod(ACC_PUBLIC, "execute", "(Lorg/bukkit/event/Listener;Lorg/bukkit/event/Event;)V", null, null), ACC_PUBLIC, "execute", "(Lorg/bukkit/event/Listener;Lorg/bukkit/event/Listener;)V"); ++ methodGenerator = new GeneratorAdapter(writer.visitMethod(ACC_PUBLIC, "execute", EXECUTE_DESCRIPTOR, null, null), ACC_PUBLIC, "execute", EXECUTE_DESCRIPTOR); + methodGenerator.loadArg(0); + methodGenerator.checkCast(Type.getType(m.getDeclaringClass())); + methodGenerator.loadArg(1);