What's the best api to create plugins?

Discussion in 'Spigot Plugin Development' started by robertforyou, May 19, 2015.

  1. Craftbukkit, Bukkit, Spigot or Spigot API? Until now i used craftbukkit but i heard is better to use spigot API. What's the best?
     
    • Funny Funny x 1
  2. CraftBukkit is the middleman between NMS and bukkit.
    Spigot is a fork of craftbukkit, and spigot-api is a fork of bukkit.

    So therefore spigot-api is an API and the more modern one.
     
  3. So spigot-api is more good to use?
     
  4. joehot200

    Supporter

    But you should also import the Spigot server JAR, or else you will not be able to use NMS code.

    Use them both.
     
  5. Only use the server jar if you require NMS. The majority of the plugins don't require NMS, hence they should not touch the server jar (and only use the API jar).
     
    • Agree Agree x 2
  6. I only import Spigot for my plugins, and any required APIs from plugins it may depend on, like BarAPI, Essentials API, etc.
     
  7. NathanWolf

    Supporter

    I personally still use the Bukkit API. The Spigot API is a superset - so if you code against the Bukkit API, your plugin will run on Craftbukkit and Spigot. If you code against Spigot-API, chances are your plugin only works on Spigot.

    If you need NMS, then yes you have to build against Spigot jar - but since no one cast host that jar, this makes your plugin builds a bit more of a challenge- as in they can't be completely Mavenized.

    So- my vote, Bukkit->Spigot API->Spigot ... use whichever left-most one you can to get the API features you need.
     
    • Like Like x 1
  8. Tbh, I think spigot is the best api atm. As nathan said, use whichever gives you the plugin you need to create. I seem to vary between CraftBukkit and Spigot API depending on what plugin I'm coding! :)
     
  9. I do just the easy way: spigot server jar
     
    • Agree Agree x 1
  10. Aha :)