A client-only mod is in the server files
What it looks like in your log
java.lang.NoClassDefFoundError: net/minecraft/client/Minecraft
What causes it
A mod that only works in the game client was installed on the dedicated server, and it crashed trying to load client-side code.
How to fix it
Remove the mod from the server's mods folder, or exclude it from the server-side pack. Players keep it in their own clients.
Why it happens
Some mods only exist on the client: shaders, minimaps, GUI tweaks, performance mods that touch rendering. They reference classes under net.minecraft.client that a dedicated server does not ship, so when the server tries to load them it cannot find the class and dies. The stack trace names a client class; the mod that referenced it is the one to remove.
It happens when a whole client mods folder is copied to the server, or when a pack ships client mods without marking them client-only and the server install includes them.
Fix it step by step
- 1Find the modThe first mod package in the stack trace above the NoClassDefFoundError is the one that referenced the client class. If the trace only shows Minecraft frames, the mod loader's own line just above usually names the mod being constructed.
- 2Remove it from the serverDelete it from the server mods/ folder. Players keep it in their own clients; the server never needed it.
- 3Check the rest of the folderWhere there is one there are usually several. Common client-only mods include OptiFine, Sodium, Iris, Xaero's minimap and any shader or GUI mod.
- 4On a pack, exclude server-sideIf the pack installer keeps putting it back, the pack needs the mod marked client-only or the server needs an exclusion list. Most panels have one.
If that didn't work
NoClassDefFoundError on org.lwjgl is the same problem with a different class: LWJGL is the graphics library and only the client has it.
Not sure this is your problem? Paste your log and Roastd will tell you which of these it actually matched, and what else it found.
Check your own log