Set up a Paper plugin
Checked against Linen’s templates on 2 November 2026. Every value on this page is copied from the template files
themselves (build.gradle.kts, settings.gradle.kts, gradle.properties, the Gradle wrapper) and from the values
New mod fills into them.
What New mod makes
Section titled “What New mod makes”Spigot, Bukkit and Purpur use the same templates as Paper; only the API dependency and its repository differ.
| Minecraft | Java | Gradle | Gradle runs on | Gradle plugin |
|---|---|---|---|---|
| 1.12.2 | 8 | 9.8.1 | Java 21 | xyz.jpenilla.run-paper 3.1.0 |
| 1.13 – 1.16.5 | 8 | 9.8.1 | Java 21 | xyz.jpenilla.run-paper 3.1.0 |
| 1.17 – 1.17.1 | 16 | 9.8.1 | Java 21 | xyz.jpenilla.run-paper 3.1.0 |
| 1.18 – 1.20.4 | 17 | 9.8.1 | Java 21 | xyz.jpenilla.run-paper 3.1.0 |
| 1.20.5 – 1.21.11 | 21 | 9.8.1 | Java 21 | xyz.jpenilla.run-paper 3.1.0 |
| 26.1 and newer | 25 | 9.8.1 | Java 25 | xyz.jpenilla.run-paper 3.1.0 |
The server API is a compileOnly dependency, because the server provides it at runtime:
| Server | API dependency | Repository |
|---|---|---|
| Paper, up to 1.16.5 | com.destroystokyo.paper:paper-api |
https://repo.papermc.io/repository/maven-public/ |
| Paper, 1.17 and newer | io.papermc.paper:paper-api |
https://repo.papermc.io/repository/maven-public/ |
| Spigot | org.spigotmc:spigot-api |
https://hub.spigotmc.org/nexus/content/groups/public/ |
| Bukkit (up to 1.15.2) | org.bukkit:bukkit |
https://hub.spigotmc.org/nexus/content/groups/public/ |
| Purpur (1.16.5 and newer, not 1.17) | org.purpurmc.purpur:purpur-api |
https://repo.purpurmc.org/snapshots |
New mod doesn’t offer Paper 1.20.5: its published paper-api needs a snapshot library that no repository serves any
more. There are no names in code to choose: plugins use the server API only, not the game’s internals.
Pinned version
Section titled “Pinned version”Linen also keeps a Paper 26.2 template with every number fixed:
| Minecraft | Paper API | Gradle plugin | Java | Gradle | plugin.yml |
|---|---|---|---|---|---|
| 26.2 | io.papermc.paper:paper-api:26.2.build.130-stable |
xyz.jpenilla.run-paper 3.1.0 |
25 | 9.7.1 | api-version: '26.2' |
plugins { java id("xyz.jpenilla.run-paper") version "3.1.0"}
dependencies { compileOnly("io.papermc.paper:paper-api:26.2.build.130-stable")}
java { toolchain.languageVersion = JavaLanguageVersion.of(25)}
tasks.runServer { minecraftVersion("26.2")}Commands
Section titled “Commands”| Task | Command |
|---|---|
Build the plugin jar (in build/libs/) |
./gradlew build |
| Start a local Paper server with the plugin | ./gradlew runServer |
runServer downloads Paper into run/. Plugins have no client run and no data generation. On Windows, use
gradlew.bat or .\gradlew.
Paper’s own guides: Project setup and plugin.yml.
In Linen
Section titled “In Linen”- New mod writes these projects for Paper, and the same templates for Spigot, Bukkit and Purpur. Pick a version; Ctrl or Shift and a click adds more.
- Linen installs the Java version the project needs.