Introduction to APIs
API stands for Application Programming Interface. An API helps control how various software components are used. As mentioned in the previous chapter, Spigot includes the Minecraft code in a form that is easy for developers to utilize when creating plugins. Spigot has a lot of code that we need not access in order to create plugins. It also includes code that we should not tamper with, as it may cause the server to become unstable. Bukkit provides us with the interfaces that we can use to properly modify the game while restricting access to other portions of the code. An interface is essentially a shell of a class. It includes methods, but the methods are empty. The Spigot server contains classes for each interface. The classes implement the interfaces and fill each method with the appropriate code.
To explain this better, let's imagine the Bukkit API as a menu to a pizza shop. The menu contains different types of pizza, such as pepperoni, Hawaiian, and meat lovers....