Some people are confused about what the difference between Bukkit, Spigot-API, CraftBukkit and Spigot is, so I’ll try to explain.
Bukkit is the basic API
Bukkit contains all the usual interfaces and enums, like org.bukkit.entity.Player or org.bukkit.Material. For most plugins, this is all you need. It does not contain any implementations, meaning: you cannot “run” it directly.
Spigot API is an improved version of Bukkit
The Spigot API is basically just “Bukkit + some additional features”. It for examples includes the org.bukkit.entity.Player.Spigot interface, which for example also allows you to send action bar messages. It also does not contain any implementations.
CraftBukkit is the implementation of Bukkit
CraftBukkit is the implementation of Bukkit. It contains everything that Bukkit contains, plus the original Minecraft Server code, plus the actual implementation of the Bukkit interfaces.
For example, CraftBukkit contains the org.bukkit.craftbukkit.v<version>.entity.CraftPlayer class, which implements org.bukkit.entity.Player. Whenever you are accessing the usual Player interface in your plugin, you are actually dealing with a CraftPlayer instance.
Let’s take a look at what happens if you use somePlayer.sendMessage(“asd”):
- You call somePlayer.sendMessage(“asd”)
- somePlayer is actually an instance of CraftPlayer, which overrides the sendMessage(String) method, so you’re actually calling this implementation
- CraftPlayer’s sendMessage(String) method delegates the “sending a message” logic to the underlying NMS Player object
So, one could say that the CraftPlayer class is basically a wrapper for the NMS Player class, exposed by the Bukkit Player interface
Spigot is the implementation of Spigot-API
Spigot is the same as CraftBukkit, but it doesn’t only implement the Bukkit API, but also the Spigot API. For example, you wouldn’t find the org.bukkit.entity.Player.Spigot class in CraftBukkit, but you’d find it in Spigot. Additionally, it includes some performance improvements and additional configuration options over CraftBukkit.
Bukkit is the basic API. CraftBukkit is a working server software that implements Bukkit, i.e. lets you run Bukkit plugins.
Spigot-API is an improved version of Bukkit. Spigot is a working server software that implements Spigot-API, i.e. lets you run Bukkit and Spigot-API plugins.
Join my Discord Server for feedback or support. Just check out the channel