From c42f410bc4b79f132ba7a33f9d88e7e154fc8d1d Mon Sep 17 00:00:00 2001 From: Gravita Date: Mon, 28 Mar 2022 22:44:43 +0700 Subject: [PATCH] [FIX] ServerWrapper main class lookup --- .../src/main/java/pro/gravit/launcher/server/ServerWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java index 5400b2b4..a07766f2 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java @@ -167,7 +167,7 @@ public void run(String... args) throws Throwable { } if (loader != null) mainClass = Class.forName(classname, true, loader); else mainClass = Class.forName(classname); - MethodHandle mainMethod = MethodHandles.publicLookup().findStatic(mainClass, "main", MethodType.methodType(void.class, String[].class)); + MethodHandle mainMethod = MethodHandles.lookup().findStatic(mainClass, "main", MethodType.methodType(void.class, String[].class)); LogHelper.info("ServerWrapper: LaunchServer address: %s. Title: %s", config.address, Launcher.profile != null ? Launcher.profile.getTitle() : "unknown"); LogHelper.info("Minecraft Version (for profile): %s", wrapper.profile == null ? "unknown" : wrapper.profile.getVersion().name); LogHelper.info("Start Minecraft Server");