File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/main/java/de/blazemcworld/jsscripts Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public class Injector {
1919 private static final Instrumentation inst = ByteBuddyAgent .getInstrumentation ();
2020 private static final List <ClassFileTransformer > transformers = new ArrayList <>();
2121 private static final List <InjectionCallback > callbacks = new ArrayList <>();
22- private static final List <Object > callbackInfo = new ArrayList <>();
22+ private static List <Object > callbackInfo = new ArrayList <>();
2323
2424 @ SuppressWarnings ("unused" )
2525 public static int registerCallback (InjectionCallback cb ) {
@@ -34,9 +34,9 @@ public static void addCallbackInfo(Object info) {
3434
3535 @ SuppressWarnings ("unused" )
3636 public static Object invokeCallback (int id ) {
37- Object result = callbacks . get ( id ). invoke ( callbackInfo ) ;
38- callbackInfo . clear ();
39- return result ;
37+ List < Object > info = callbackInfo ;
38+ callbackInfo = new ArrayList <> ();
39+ return callbacks . get ( id ). invoke ( callbackInfo ) ;
4040 }
4141
4242 public static void transformMethod (String className , String methodName , Consumer <MethodNode > transformer ) {
You can’t perform that action at this time.
0 commit comments