Requirements
Before starting, ensure you have:- Git - Version control system
- JDK 21 or later - Required for building Paper
- Adoptium provides builds for most operating systems
- Paper uses Gradle’s Toolchains feature
- IntelliJ IDEA (recommended) - Most of the Paper team uses IntelliJ
While other IDEs may work, IntelliJ IDEA is the recommended and officially supported IDE for Paper development.
Windows-Specific Setup
Setting up WSL 2
WSL 2 is available on Windows 10 version 2004 (build 19041) or higher. Check your version by runningwinver.
1
Install WSL 2
Follow the official Microsoft WSL installation guide.
2
Install Ubuntu
Install Ubuntu from the Microsoft Store (or your preferred Linux distribution).
3
Install development tools
4
Access WSL files in Windows
You can access your WSL files from Windows File Explorer:
Repository Setup
1
Fork the repository
Fork the PaperMC/Paper repository to your personal GitHub account.
2
Clone your fork
3
Add upstream remote
4
Apply patches
paper-server/src/minecraft directory with Paper’s patched Minecraft source.IntelliJ IDEA Configuration
Recommended Settings
1
Import the project
Open IntelliJ IDEA and import the Paper project as a Gradle project. IntelliJ should automatically detect the Gradle configuration.
2
Disable sync external changes
This is critical for performance during patch operations.Navigate to:Disable this option:
- ☐ Sync external changes: Periodically when the IDE is inactive (experimental)
3
Disable reopen projects on startup (optional)
To avoid freeze loops when patches fail:Navigate to:Disable this option:
- ☐ Reopen projects on startup
4
Configure Java toolchain
IntelliJ should automatically detect your JDK 21 installation through Gradle’s toolchain configuration.Verify under:Gradle JVM should be set to JDK 21 or use the Gradle default.
IDE Features
IntelliJ IDEA provides excellent support for:
- Git integration and conflict resolution
- Gradle task execution
- Debugging Paper server instances
- Code navigation in Paper’s patched Minecraft source
- Automatic code formatting according to Paper’s style
Understanding the Project Structure
Paper uses a patch-based development workflow:Important Directories
paper-api/- Changes to the Bukkit APIpaper-server/src/minecraft/- Minecraft source modifications (patch-tracked)paper-server/src/main/- Non-Minecraft server code (regular Git)patches/- Actual patch files that get applied
Development Workflow
Making Changes
1
Create a feature branch
2
Make your changes
- For API changes: Edit files in
paper-api/ - For Minecraft changes: Edit files in
paper-server/src/minecraft/ - For other server changes: Edit files in
paper-server/src/main/
3
Test your changes
4
Rebuild patches
If you modified files in For other changes, commit normally with Git.
paper-server/src/minecraft/:5
Commit your changes
Modifying Minecraft Patches
For per-file patches (most common):- Make changes to files in
paper-server/src/minecraft/ - Run
./gradlew fixupSourcePatches - Run
./gradlew rebuildPatches - Commit the updated patch files
See the CONTRIBUTING.md for detailed information on:
- Handling rebase conflicts
- Creating feature patches
- Using fixup commits
- Patch formatting guidelines
Using the Test Plugin
Paper includes an optional test plugin module for testing API changes.1
Enable the test plugin
Enable it in
test-plugin.settings.gradle.kts (generated after running Gradle once).2
Edit the test plugin
Make changes to
test-plugin/src/main/java/.3
Run with the test plugin
Testing API Changes Locally
To test your Paper changes in external plugins:1
Publish to Maven Local
2
Configure your plugin project
For Gradle:Add
mavenLocal() as the first repository:3
Use Paper in your plugin
Your plugin will now use your locally-built Paper version.
Git Workflow Tips
Keeping Your Fork Updated
Understanding Git Basics
Paper’s patch system is built on Git. If you’re new to Git, review this tutorial: https://git-scm.com/docs/gittutorialCommon Issues
IntelliJ freezes during patch application
Solution: Disable “Sync external changes” in IntelliJ settings (see IntelliJ IDEA Configuration).Patch conflicts during rebase
See the CONTRIBUTING.md rebase conflict resolution guide.Build fails with “JAVA_HOME not set”
Solution: Ensure JDK 21 is installed and JAVA_HOME points to it:Next Steps
- Read the CONTRIBUTING.md for detailed contribution guidelines
- Learn about code formatting and style requirements
- Explore available Gradle tasks
- Join the Paper Discord for help and discussion