# Source code of Minecraft servers?

Is there any way to get the source code of Minecraft servers? I tried decompiling but I get very obfuscated arguments, classes, and methods.

If the answer is no, how did services like Bukkit and Spigot create their 'servers'?

• I don't have direct experience with Bukkit or Spigot servers, but it's often possible to intercept packets 1) going from the client to the server and 2) going from the server to the client. With those, you can build a sort of "clean-room" implementation of the server. My guess is that's what they did. I believe this is the case for things like the vanilla WoW servers, and the community Battle.net (bnetd) servers. Conjecture, so a comment not a full-fledged answer. :) – derstander Mar 2 '17 at 1:31

There is the modcoderpack. It contains the minecraft client and server code: http://www.modcoderpack.com/website/releases

As far as I'm aware, your only option is to decompile the .jar and cope with the fact that the results are obfuscated, just like everybody else. In the past, there were tools to help deobfuscate the decompiled Minecraft code, as discussed here. I have no idea if such tools are still maintained, and as such can't make recommendations.

In theory you could obtain a source license from Microsoft, and get the raw source that way, but only if they were even willing to entertain such a deal in general and with you in the specific.