From 41d7c7e864277bb0aa6fb706a00de4c289e17b53 Mon Sep 17 00:00:00 2001 From: Roman Zhuravlev Date: Wed, 3 Sep 2025 19:35:25 +0500 Subject: [PATCH] Remove the use of the getAsyncExecutor method because it is missing --- .../velocity/reflection/RVelocityEventManager.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Velocity/src/main/java/net/frankheijden/serverutils/velocity/reflection/RVelocityEventManager.java b/Velocity/src/main/java/net/frankheijden/serverutils/velocity/reflection/RVelocityEventManager.java index 0161b11..cfa2d24 100644 --- a/Velocity/src/main/java/net/frankheijden/serverutils/velocity/reflection/RVelocityEventManager.java +++ b/Velocity/src/main/java/net/frankheijden/serverutils/velocity/reflection/RVelocityEventManager.java @@ -9,7 +9,6 @@ import dev.frankheijden.minecraftreflection.MinecraftReflection; import java.lang.reflect.Array; import java.util.List; import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutorService; import java.util.stream.Collectors; public class RVelocityEventManager { @@ -65,7 +64,7 @@ public class RVelocityEventManager { Object registrationsEmptyArray = Array.newInstance(RHandlerRegistration.reflection.getClazz(), 0); Class registrationsArrayClass = registrationsEmptyArray.getClass(); - ExecutorService executor = reflection.invoke(manager, "getAsyncExecutor"); + /*ExecutorService executor = reflection.invoke(manager, "getAsyncExecutor"); executor.execute(() -> reflection.invoke( manager, "fire", @@ -74,7 +73,16 @@ public class RVelocityEventManager { ClassObject.of(int.class, 0), ClassObject.of(boolean.class, true), ClassObject.of(registrationsArrayClass, registrations.toArray((Object[]) registrationsEmptyArray)) - )); + ));*/ + reflection.invoke( + manager, + "fire", + ClassObject.of(CompletableFuture.class, future), + ClassObject.of(Object.class, event), + ClassObject.of(int.class, 0), + ClassObject.of(boolean.class, true), + ClassObject.of(registrationsArrayClass, registrations.toArray((Object[]) registrationsEmptyArray)) + ); return future; }