![Just Enough Keys [JEK] [Forge]](https://media.forgecdn.net/avatars/thumbnails/396/887/256/256/637597227484677762.png)
[1.18.1] If JEK is in server instance, it crashes
itsdinkd opened this issue ยท 1 comments
Hello. I am the modpack dev of AQM2. Some players accidently set up their server instance of my modpack using the client pack and not the server pack. When they do this, their servers fail to start because JEK is in their server mods folder, and JEK does not like that. Could you write out some code to make the mod not run when in a server environment please? or at least just not crash
this is the fatal error shown
java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'justenoughkeys'!
at Not Enough Crashes deobfuscated stack trace.(1.18.1+build.12) ~[?:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke0$0(EntrypointUtils.java:51) ~[fabric-loader-0.12.12.jar:?]
at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.12.12.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:49) ~[fabric-loader-0.12.12.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35) ~[fabric-loader-0.12.12.jar:?]
at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:62) ~[fabric-loader-0.12.12.jar:?]
at net.minecraft.server.Main.main(Main:106) [server-intermediary.jar:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:608) [fabric-loader-0.12.12.jar:?]
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77) [fabric-loader-0.12.12.jar:?]
at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) [fabric-loader-0.12.12.jar:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:66) [fabric-loader-0.12.12.jar:?]
Caused by: java.lang.NoClassDefFoundError: net/minecraft/class_304
at xyz.starmun.justenoughkeys.fabric.JustEnoughKeysFabric.onInitialize(JustEnoughKeysFabric.java:15) ~[justenoughkeys-0.5.2-fabric.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47) ~[fabric-loader-0.12.12.jar:?]
... 15 more
Caused by: java.lang.ClassNotFoundException: net.minecraft.class_304
at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[?:?]
at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:158) ~[fabric-loader-0.12.12.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
at xyz.starmun.justenoughkeys.fabric.JustEnoughKeysFabric.onInitialize(JustEnoughKeysFabric.java:15) ~[justenoughkeys-0.5.2-fabric.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47) ~[fabric-loader-0.12.12.jar:?]
... 15 more