Guide
How to make a Spigot plugin
Updated October 7, 2026
A Spigot plugin uses the Bukkit/Spigot API, so it runs on Spigot and on every fork of it, Paper included. That makes it the widest choice when you do not know where the plugin will run. This guide covers the project, the code and the build.
Change the example to your server.
Generate this with CodexeStep by step
1.Set up Java and a build tool
Install the JDK that matches your Minecraft version (17, 21 or 25) and use Maven or Gradle.
2.Add the Spigot API
Add
spigot-apifor your version from the Spigot repository withprovidedscope. It is only needed to compile; the server provides it at runtime.3.Write commands and listeners
Register a
CommandExecutorwithgetCommand("name").setExecutor(...)and event listeners withregisterEvents.4.Write plugin.yml
Name, version, main class,
api-version(from 1.13), commands and permissions.5.Build and install
mvn package, then copy the .jar fromtarget/to the server'splugins/folder and restart.
Old versions (1.8 to 1.12)
Many minigame servers still run 1.8. The API is older (no api-version, different material names), so a plugin must be written for that version, not copied from a 1.21 tutorial. Codexe asks for the version and writes the code for that API.
With Codexe
Describe the plugin and say "Spigot" with the version. Codexe generates the Maven project, compiles it, fixes errors, and lets you test it on a test server of that version before you download it.
Questions
Do I need BuildTools?
Only to run a Spigot server or to use NMS (internal server code). To compile against the normal API, the spigot-api dependency is enough.
Spigot plugin or Paper plugin?
Spigot if it must run everywhere; Paper if your server runs Paper and you want its extra API. See how to make a Paper plugin.
Make a Spigot plugin
This prompt opens ready to send:
“A Spigot 1.8.8 plugin called Kits: /kit <name> gives a configurable set of items with a cooldown per kit, kits defined in config.yml, permission kits.<name> per kit, cooldowns saved across restarts.”
Generate this with Codexe