Add the Paper Repository
Add the Paper Maven repository to yourpom.xml file:
pom.xml
repo.papermc.io.
Add the Paper API Dependency
Add the Paper API as a provided dependency:pom.xml
The
provided scope is essential because the Paper server already includes the API at runtime. Including it in your plugin JAR would cause conflicts and increase file size unnecessarily.Version Selection
The Paper API uses version numbers that correspond to Minecraft versions:1.21.11-R0.1-SNAPSHOT- Latest development version for Minecraft 1.21.11- Replace with your target Minecraft version
- The
-SNAPSHOTsuffix indicates this is a development build
Java Version Requirement
Paper requires Java 21 or later. Configure your Maven compiler plugin:pom.xml
Complete Example
Here’s a minimalpom.xml configuration for a Paper plugin:
pom.xml
Next Steps
After setting up Maven integration:- Create your plugin main class extending
JavaPlugin - Add a
paper-plugin.ymlorplugin.ymlfile - Build your plugin with
mvn clean package - Test your plugin on a Paper server