Build a Minecraft plugin for Paper
Paper runs many Bukkit and Spigot plugins, but it does not guarantee that code using a newer API will work everywhere. Start with the API and server version you target.

Paper is a server plugin platform, not a mod loader
Paper is a server platform built on Bukkit and Spigot APIs, with additional optimizations and APIs. A Paper plugin runs inside the server process and normally installs in the plugins folder. This differs from a Fabric or Forge mod, which uses a mod loader and may also need files installed on the player's client. Do not use the .jar extension to decide where a file belongs; inspect its project metadata and dependencies.
Plugin markers include plugin.yml or paper-plugin.yml and dependencies such as paper-api or spigot-api. Paper projects can use Maven or Gradle, with their build files at the root or in a clear module. For a multi-module repository, include the root with the parent file and module settings; uploading only a child folder may leave shared API versions outside the archive.
Choose the right API
If you do not need a Paper-specific feature, Bukkit or Spigot APIs may make the plugin easier to run on more server types. Compatibility is not automatic in both directions: code that calls a Paper-only API cannot run on Spigot if Spigot does not provide it. Set the oldest server release you intend to support, then choose a matching dependency. Raising the API to the latest release may introduce methods unavailable on older servers.
Maven projects commonly declare paper-api with provided scope; Gradle projects may use compileOnly. The server supplies the API at runtime, so a plugin should not normally bundle an entire copy of Paper or Spigot. Follow the target release's instructions because dependency conventions can change with tool and platform versions. The Maven and Gradle guides show where those settings live.
Descriptors and the entry point
In the traditional plugin system, plugin.yml contains the name, version, main class, and optional commands or permissions. The class named by main must exist after compilation and follow the API's expected structure. Put the descriptor under src/main/resources so the build copies it to the JAR root. Inspect the output to make sure it is not at resources/plugin.yml or nested under an extra folder.
Paper also supports newer plugin models and descriptors such as paper-plugin.yml, depending on the plugin type and release. Do not replace a Bukkit descriptor just because the newer filename exists; choose the format supported by your code and platform, and check current documentation. api-version concerns server API compatibility, not Java. If the server rejects the value, use the Unsupported API version guide rather than lowering it without checking the source.
Check Java and Minecraft versions
These are separate values: Minecraft release, the Paper release based on it, and the Java version used to run the server and compile the project. A build may succeed on a current JDK and then fail to load on a host running older Java. Each Minecraft release also has its own runtime requirements. Match the toolchain and compiler target to the oldest environment you plan to support; do not rely only on Java installed on your computer.
If invalid source release: 21 appears, the selected compiler is older than the requested level. If you see Unsupported class file major version 65, the build tool or runtime may not understand Java 21 bytecode. First identify when the message appears, then check the Java chart or the major version 65 guide.
Build and test the artifact
Upload a ZIP containing the build file, source, and resources. The service can detect Maven or Gradle and read project markers, but it will not turn code for another platform into a Paper plugin. After the build, check the artifact name, contents, descriptor, and compiled classes. If the project creates multiple JARs for separate modules, choose the one that actually targets Paper; do not confuse an API module with a test artifact.
Install the output on a matching test server. Watch startup logs, confirm the plugin loads, and test its commands, events, and storage. Paper does not make every Spigot plugin compatible if it depends on unofficial behavior, and compiler success does not prove that runtime, permissions, or database settings are correct. Keep a backup before testing code that changes a world or player data.
Common Paper errors
InvalidDescriptionException may point to malformed YAML or a missing descriptor field. Unsupported API version means the value is newer than the server supports. NoClassDefFoundError may indicate an external library was not packaged, while NoSuchMethodError often means the runtime dependency is older than the version used to compile. Start at the first cause in the log and avoid changing Java and API settings together.
For a plugin built from source, follow the ZIP guide. For Java issues, see source release 21. To distinguish a Paper plugin from a mod, read the Fabric guide or the broader platform overview.
Paper and Folia compatibility
Paper runs many plugins targeting Bukkit or Spigot, but it also adds APIs that may be tied to a particular release. If source code calls Paper classes directly, document that and do not expect a server providing only Bukkit APIs to work. Folia uses a different scheduling model for world regions; compatibility requires code designed for that model, not just successful compilation against a Paper API. Check the plugin author's Folia statement and test tasks that touch world or player objects.
Do not raise api-version merely to claim compatibility with Paper, and do not lower it to hide a dependency on a newer method. State the oldest version you actually tested and run the plugin on a clean Paper server. When the server emits a warning or rejection, collect its version, Java version, and full message before changing dependencies.
Set up a Paper test environment
Create a separate server folder with a Paper build for the Minecraft release you target and the Java version that release requires. Start it once to complete setup, then stop it before installing the plugin. Put one JAR in plugins, start the server, and watch the log. If loading fails, remove the plugin from the test environment and review the change before trying again. This separates a plugin issue from a server full of unrelated extensions.
If you are checking Paper and Spigot compatibility, use two folders or clean installations and record each result. Remember that an extension may need a database or configuration file; begin with test settings rather than production data. Repeat the test after changing an API or dependency because a previous successful release does not prove the new one is compatible.