Guide
How to make a Paper plugin
Updated October 7, 2026
Paper is the most used Minecraft server software for plugins: it runs Spigot plugins and adds a larger, faster API on top. A Paper plugin is a Java (or Kotlin) project compiled against paper-api. Here is what it needs, by hand or with an AI that builds it for you.
An example to start from.
Generate this with CodexeStep by step
1.Choose the Minecraft version
Use the version your server runs. It decides the Java version: Java 17 before 1.20.5, Java 21 from 1.20.5, Java 25 for 26.x.
2.Create the project
A Gradle or Maven project with the
paper-apidependency for that version, from the PaperMC repository, in theprovided/compileOnlyscope.3.Write the main class
A class that extends
JavaPlugin, withonEnable()to register commands and listeners.4.Describe the plugin to the server
plugin.yml(name, version, main, api-version, commands, permissions). Paper also supportspaper-plugin.yml, with its own loading rules.5.Build and test
Build the .jar, put it in the
plugins/folder of a Paper test server, start it and check the console for errors.
Paper or Spigot?
Code written for the Spigot API runs on Paper, but not the other way around: Paper adds events and methods (for example the Adventure text components and many async APIs) that Spigot does not have. Write for Paper if your server runs Paper; write for Spigot if the plugin must also run on Spigot servers.
The fast way
On Codexe, choose a Bukkit/Spigot/Paper plugin, say "Paper" and the version in the request, and describe what it does. Codexe sets up the project and the right Java version, compiles it, fixes build errors and lets you join a Paper test server with the plugin installed.
Common problems
- UnsupportedClassVersionError: the plugin was compiled with a newer Java than the server runs.
- NoSuchMethodError / NoClassDefFoundError: the plugin uses an API that does not exist on the server version, or a dependency was not shaded into the .jar.
- Plugin loads but commands do nothing: the command is missing from
plugin.ymlor the executor is not registered.
Questions
Do Paper plugins work on Purpur or Folia?
Purpur is a Paper fork, so Paper plugins run there. Folia changes threading: a plugin must be written for its region scheduler to run on Folia.
Can I write a Paper plugin in Kotlin?
Yes. Codexe can generate a Kotlin Gradle project with build.gradle.kts for the same Paper API.
Build a Paper plugin now
This prompt opens ready to send:
“A Paper 1.21.4 plugin called Bounties: /bounty set <player> <amount> using the Vault economy, the killer gets the reward, /bounty list shows the top 10, bounties are saved across restarts, messages in config.yml.”
Generate this with Codexe