Using net.minecraft.server (NMS)

If you’re using Gradle you can use something like the following to get the Vanilla server source additionally to your dependency on SpongeAPI. This will setup a ForgeGradle project which sets up the same workspace we use in SpongeCommon.

Make sure to run setupDecompWorkspace before importing the project into your IDE.

Note: That doesn’t add the Sponge implementation to your classpath, although in most cases you will probably only want to access MCP anyway.