mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Fix wrong descriptor in ASMEventExecutorGenerator (#8506)
This commit is contained in:
parent
40889ab866
commit
878600ebbc
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue