PR Policy
Paper accepts changes that make sense and can be justified. When submitting a PR, consider:- Justification: Be able to explain why the change is needed
- Maintenance costs: Changes affect everyone running Paper, not just your server
- Obfuscation helpers: Use them to reduce future maintenance burden
- Formatting: Follow the guidelines in the formatting guide
Paper will fix minor formatting issues, but following the guidelines from the start speeds up the review process.
Target Branch and Versions
Main Branch (Latest Minecraft)
Most PRs should target the
main branch, where active development for the latest Minecraft release happens.main branch is typically frozen during this time.
Ask in the Paper Discord if you’re unsure about timing.
Older Minecraft Versions
Snapshot and Pre-Release Versions
Only target snapshot/pre-release branches for:- Features specific to that version (e.g., new blocks/mobs in upcoming releases)
- Bugs that only exist in the dev branch
PR Submission Process
Prepare Your Changes
- Make your changes following the patching guide
- Ensure code follows the formatting guidelines
- Test your changes thoroughly
Writing Good PR Descriptions
Your PR description should clearly communicate:Summary
- What the PR changes
- Why the change is necessary
- What problem it solves
Technical Details
For complex or technical changes, explain:- Implementation approach
- Design decisions
- Trade-offs considered
- Performance implications
If your patch is technical or complex, Paper may ask you to add notes to the patch header. These notes help maintain the patch long-term, especially across major version changes.
CI Builds
Paper automatically builds all PRs to check for compilation errors.Skipping CI
If your commit doesn’t need a build (e.g., changes toREADME.md, CONTRIBUTING.md, or LICENSE.md), add [ci skip] to the start of your commit subject:
Review Process
What to Expect
- Initial Review: A Paper team member will review your PR
- Feedback: You may receive requests for changes or clarification
- Modifications: Paper may directly modify your PR for minor fixes or rebases
- Approval: Once approved, your PR will be merged
This is why using a personal fork (not an organization) is important—it allows Paper to make direct modifications to speed up the process.
Responding to Feedback
When changes are requested:- Make the requested changes
- Run
./gradlew rebuildPatches - Commit the changes:
No need to force push when addressing feedback—just push normally. Force push is only needed when rebasing.
Testing Your Changes
Using the Test Plugin
Paper includes atest-plugin module for testing API changes:
Enable Test Plugin
Enable it in
test-plugin.settings.gradle.kts (generated after running Gradle once).Publishing to Maven Local
To test with external plugins:Configuration Changes
If your patch requires configurable values:Global Configuration
UseGlobalConfiguration for values that must remain the same across all worlds:
World-Specific Configuration
UseWorldConfiguration for values that can differ between worlds (preferred when possible):
Level instance):
- Field type determines the setting type
- Default value is the initial field value
- Setting name defaults to snake-case of the field name
- Use
@Settingannotation to override the default name
Obfuscation Helpers
Obfuscation helpers improve code readability and maintainability for unmapped variables or poorly-named parameters. Example for local variables:Obfuscation helpers should be easy for the JVM to inline. The goal is always to improve readability and maintainability.
Common Issues
Patch Conflicts
If your PR conflicts with recent changes:- Follow the rebasing guide
- Resolve conflicts
- Test your changes still work
- Force push to update the PR
Build Failures
If CI builds fail:- Check the build logs for errors
- Fix compilation issues locally
- Run
./gradlew rebuildPatches - Push the fixes
Review Delays
If your PR hasn’t been reviewed:- Be patient—Paper maintainers are volunteers
- Ensure your PR is complete and follows guidelines
- Don’t bump the PR repeatedly
- Consider asking in Discord if it’s been several weeks
Best Practices
- One feature per PR: Keep PRs focused on a single change
- Descriptive commits: Write clear commit messages explaining the “why”
- Test thoroughly: Ensure your changes work in various scenarios
- Follow guidelines: Adhere to formatting and contribution guidelines
- Be responsive: Address review feedback promptly
- Ask questions: Use Discord or GitHub issues if you’re unsure
Remember: Paper maintainers want to help your PR get merged. Following these guidelines makes the process smoother for everyone.