Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/PaperMC/Paper/llms.txt

Use this file to discover all available pages before exploring further.

Paper uses Gradle as its build system. This page documents the most important tasks available for building, testing, and developing Paper.

Viewing All Tasks

To see a complete list of available tasks with descriptions:
./gradlew tasks

Core Build Tasks

These tasks are essential for compiling Paper from source.

applyPatches

Applies Paper’s patches to the Minecraft source code.
./gradlew applyPatches
You must run this task before you can build Paper or make code changes. This task creates the paper-server/src/minecraft directory with Paper’s modified Minecraft source.

rebuildPatches

Rebuilds Paper’s patch files from your current changes in the source directory.
./gradlew rebuildPatches
Use this after making changes to paper-server/src/minecraft or paper-api to convert your commits into patch files.

fixupSourcePatches

Automatically fixes up per-file patches when you make changes to Minecraft source files.
./gradlew fixupSourcePatches
After making changes to files in paper-server/src/minecraft, run this task followed by rebuildPatches.

Server Build Tasks

These tasks create runnable server JAR files in different formats.

createMojmapBundlerJar

Creates a Mojang-mapped bundler JAR file (recommended for development).
./gradlew createMojmapBundlerJar
Output: paper-server/build/libs/paper-bundler-<version>-mojmap.jarThis is the primary build task mentioned in Paper’s README.

createReobfBundlerJar

Creates a reobfuscated bundler JAR file (for production).
./gradlew createReobfBundlerJar
Output: paper-server/build/libs/paper-bundler-<version>-reobf.jar

createMojmapPaperclipJar

Creates a Mojang-mapped Paperclip JAR file.
./gradlew createMojmapPaperclipJar
Output: paper-server/build/libs/paper-paperclip-<version>-mojmap.jar

createReobfPaperclipJar

Creates a reobfuscated Paperclip JAR file.
./gradlew createReobfPaperclipJar
Output: paper-server/build/libs/paper-paperclip-<version>-reobf.jar

jar

Creates the basic server JAR without bundling.
./gradlew jar
Output: paper-server/build/libs/paper-server-<version>.jar

reobfJar

Creates a reobfuscated server JAR.
./gradlew reobfJar

Testing Tasks

test

Runs Paper’s test suite.
./gradlew test
The test configuration automatically:
  • Runs tests in a temporary working directory
  • Uses JUnit Platform with tag filtering (excludes “Slow” tests)
  • Forks for each test class
  • Includes Mockito agent for Java 21+ compatibility

check

Runs all verification tasks including tests and code scanning.
./gradlew check
This task includes:
  • Running the test suite
  • Scanning the JAR for bad API calls (@DoNotUse annotations)

Development Server Tasks

These tasks let you quickly spin up a test server without manually running JAR files.

runDevServer

Runs a development server directly from compiled classes (fastest for testing changes).
./gradlew runDevServer
This task doesn’t create a JAR file - it runs directly from the build output. Perfect for rapid iteration during development.

runServer

Runs a test server from the Mojang-mapped JAR.
./gradlew runServer

runReobfServer

Runs a test server from the reobfuscated JAR.
./gradlew runReobfServer

runBundler

Runs a test server from the Mojang-mapped bundler JAR.
./gradlew runBundler

runReobfBundler

Runs a test server from the reobfuscated bundler JAR.
./gradlew runReobfBundler

runPaperclip

Runs a test server from the Mojang-mapped Paperclip JAR.
./gradlew runPaperclip

runReobfPaperclip

Runs a test server from the reobfuscated Paperclip JAR.
./gradlew runReobfPaperclip
All run tasks:
  • Use the directory specified by paper.runWorkDir property (defaults to run/)
  • Add the test plugin automatically if enabled
  • Start with --nogui flag
  • Allocate memory based on paper.runMemoryGb property (default: 2GB)
  • Support enhanced class redefinition for hot-swapping

Publishing Tasks

publishToMavenLocal

Publishes Paper API and Server to your local Maven repository.
./gradlew publishToMavenLocal
Useful for testing Paper changes in your own plugins locally.

generateDevelopmentBundle

Generates a development bundle for plugin development.
./gradlew generateDevelopmentBundle

Utility Tasks

printMinecraftVersion

Prints the Minecraft version Paper is built for.
./gradlew printMinecraftVersion

printPaperVersion

Prints the current Paper version.
./gradlew printPaperVersion

clean

Removes all build outputs.
./gradlew clean
This removes the build/ directories but does not remove the patched source. Use cleanCache if you need a full reset.

Task Configuration

You can customize task behavior using Gradle properties in gradle.properties:
PropertyDefaultDescription
paper.runWorkDirrunDirectory for test server files
paper.runMemoryGb2Memory allocation for run tasks (GB)
paper.runDisableWatchdogfalseDisable server watchdog
mcVersion(set in project)Minecraft version to build

Common Task Chains

Full Clean Build

./gradlew clean applyPatches createMojmapBundlerJar

Development Workflow

# 1. Make changes to source
# 2. Test changes
./gradlew runDevServer

# 3. Rebuild patches
./gradlew fixupSourcePatches rebuildPatches

Testing Plugin Compatibility

./gradlew publishToMavenLocal
# Then use Paper in your plugin project

Next Steps

Build docs developers (and LLMs) love