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.
Install WSL 2
Follow the official Microsoft WSL installation guide.
Install development tools
Repository Setup
Fork the repository
Fork the PaperMC/Paper repository to your personal GitHub account.
IntelliJ IDEA Configuration
Recommended Settings
Import the project
Open IntelliJ IDEA and import the Paper project as a Gradle project. IntelliJ should automatically detect the Gradle configuration.
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)
Disable reopen projects on startup (optional)
To avoid freeze loops when patches fail:Navigate to:Disable this option:
- ☐ Reopen projects on startup
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
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/
Rebuild patches
If you modified files in For other changes, commit normally with Git.
paper-server/src/minecraft/: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.Enable the test plugin
Enable it in
test-plugin.settings.gradle.kts (generated after running Gradle once).Testing API Changes Locally
To test your Paper changes in external plugins: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