1.15.2 Spigot and Maven

Discussion in 'Spigot Plugin Development' started by MaximePremont, Feb 3, 2020.

  1. Hello, I would like to use spigot with maven, but when I add the API to my project I don't have access to the NMS classes whereas when I add it in external jar I don't have any problems. How to do ?
    Thank you !
  2. For the NMS classes, use BuildTools to generate Spigot and use the argument --compile craftbukkit and then edit your pom.xml to add your local spigot jar containing the NMS classes
  3. not necessary. doesnt change anything
  4. I wasnt able to use NMS until I did that, but I used maven commands too so that might be it
  5. if you import craftbukkit then it wouldnt work til you built craftbukkit. but the spigot server is still being generated with craftbukkit inside it. all that command does is make spigot with craftbukkit AND craftbukkit by itself also build. they disabled this option because people shouldnt be using craftbukkit servers. they should use spigot servers which already contain craftbukkit.
  6. I need to check my maven project, I probably used the craftbukkit jar then , woops
  7. BuildTools automatically install the server jar and the api jars to your local repository ;)
    • Like Like x 1