First off, thank you for considering contributing to NetworkDataAPI! 🎉
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Pull Request Process
- Coding Standards
- Commit Messages
This project adheres to a code of conduct. By participating, you are expected to uphold this code. Please be respectful and constructive in all interactions.
If you find a bug:
- Check if it's already reported in Issues
- If not, create a new issue with:
- Clear title and description
- Steps to reproduce
- Expected vs actual behavior
- Server version, Java version
- Relevant logs/screenshots
Feature suggestions are welcome! Please:
- Check existing feature requests
- Create a new issue with:
- Clear use case
- Expected benefits
- Possible implementation approach
- Fix typos or clarify existing docs
- Add examples
- Translate documentation
- Update outdated information
See Development Setup and Pull Request Process below.
- JDK 17 or higher (JDK 21 recommended)
- Maven 3.6+
- Git
- IDE (IntelliJ IDEA recommended)
- MongoDB (for testing, optional)
-
Fork the repository
# Click "Fork" on GitHub -
Clone your fork
git clone https://github.com/YOUR_USERNAME/NetworkDataAPI.git cd NetworkDataAPI -
Add upstream remote
git remote add upstream https://github.com/ORIGINAL_USERNAME/NetworkDataAPI.git
-
Build the project
mvn clean package
-
Import into IDE
- IntelliJ: File → Open → Select
pom.xml - Eclipse: File → Import → Existing Maven Projects
- IntelliJ: File → Open → Select
NetworkDataAPI/
├── networkdataapi-core/ # Core logic (database, cache, API)
├── networkdataapi-paper/ # Paper/Spigot implementation
├── networkdataapi-bungee/ # BungeeCord implementation
└── .github/workflows/ # CI/CD workflows
-
Create a new branch
git checkout -b feature/your-feature-name # or git checkout -b fix/bug-description -
Keep your fork updated
git fetch upstream git merge upstream/main
-
Write clean, documented code
- Follow existing code style
- Add JavaDoc for public methods
- Write self-documenting code
-
Test your changes
mvn clean test mvn clean package -
Test on real server (if applicable)
- Test on Paper/Spigot
- Test on BungeeCord
- Verify no breaking changes
-
Commit your changes
git add . git commit -m "feat: add new feature"
-
Push to your fork
git push origin feature/your-feature-name
-
Create Pull Request
- Go to your fork on GitHub
- Click "New Pull Request"
- Fill in the template:
- Title: Clear, concise description
- Description: What, why, how
- Related Issues: Link related issues
- Testing: How you tested it
- Breaking Changes: List any breaking changes
-
Wait for review
- Address review comments
- Update your PR if needed
- Be patient and respectful
- ✅ All CI checks pass
- ✅ Code follows style guidelines
- ✅ New code has JavaDoc
- ✅ No merge conflicts
- ✅ Tested on both Paper and BungeeCord (if applicable)
Follow standard Java conventions:
- Indentation: 4 spaces (no tabs)
- Line length: Max 120 characters
- Braces: Same line for methods/classes
- Naming:
- Classes:
PascalCase - Methods:
camelCase - Constants:
UPPER_SNAKE_CASE - Variables:
camelCase
- Classes:
Document all public classes and methods:
/**
* Brief description of what this does.
*
* <p>Longer description with more details if needed.</p>
*
* @param parameter description of parameter
* @return description of return value
* @throws ExceptionType when this exception is thrown
* @since 1.0
*/
public ReturnType methodName(ParameterType parameter) {
// implementation
}- One class per file
- Logical method ordering
- Group related methods together
- Use meaningful variable names
- Avoid magic numbers (use constants)
- Use
@ThreadSafeannotation when applicable - Document thread-safety guarantees
- Use proper synchronization
- Prefer immutability
- Don't swallow exceptions
- Log errors appropriately
- Provide meaningful error messages
- Use try-with-resources
Follow Conventional Commits:
<type>(<scope>): <subject>
<body>
<footer>
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting)refactor: Code refactoringperf: Performance improvementstest: Adding/updating testschore: Build/tooling changesci: CI/CD changes
feat(core): add player data caching
fix(rest): resolve type conversion issue in updateData
docs(api): update API usage examples
refactor(database): simplify connection pooling logic
perf(cache): optimize cache eviction strategy- Use imperative mood ("add" not "added")
- Don't capitalize first letter
- No period at the end
- Max 50 characters
- Explain what and why, not how
- Wrap at 72 characters
- Separate from subject with blank line
- Reference issues:
Fixes #123,Closes #456 - Breaking changes:
BREAKING CHANGE: description
# Run all tests
mvn test
# Run specific test
mvn test -Dtest=PlayerDataServiceTest
# Run with coverage
mvn test jacoco:report- Place tests in
src/test/java - Name test classes
*Test.java - Use descriptive test method names
- Test both success and failure cases
- Mock external dependencies
- Open a Discussion
- Join our Discord (if available)
- Check existing issues and PRs
Your contributions make this project better for everyone in the Minecraft community!
Happy coding! 🚀