Contributing to the Plugin

Thank you for your interest in contributing to Spawn Elytra :) This guide will help you get started with contributing to the project.

Ways to Contribute

1. Suggest Features

  • Go to the issues page on the Spawn Elytra github repository

  • Add an Issue

  • Label it as "enhancement"

  • Write the idea

  • Create the Issue

2. Report Bugs

Found a bug? Help us improve by reporting it:

  1. Check existing issues to avoid duplicates

  2. Create a new issue with:

    • Clear bug description

    • Steps to reproduce

    • Expected vs actual behavior

    • Server version and plugin version

    • Relevant configuration sections

    • Error messages or stack traces

Bug Report Template:

**Description**
A clear description of the bug.

**Steps to Reproduce**
1. Configure plugin with...
2. Try to activate elytra by...
3. Observe that...

**Expected Behavior**
What should happen.

**Actual Behavior**
What actually happens.

**Environment**
- Minecraft Version: 1.21.4
- Server Type: Paper
- Plugin Version: 1.2
- Java Version: 21

**Configuration**
```yaml
# Relevant config sections

Error Log

# Any error messages

3. Submit Code

Development Setup

  1. Fork the Repository

    git clone https://github.com/blaxkkkk/SpawnElytra.git
    cd SpawnElytra
  2. Set Up Development Environment

    • Java 21 or higher

    • Maven

    • IDE (IntelliJ IDEA recommended)

  3. Build the Project

    mvn clean package

Code Standards

Follow these guidelines:

  1. Java Conventions

    • Use meaningful variable names

    • Follow standard Java naming conventions

    • Add JavaDoc comments for public methods

    • Keep methods focused and concise

  2. Code Style

    public class ExampleClass {
        private final Main plugin;
        
        public ExampleClass(Main plugin) {
            this.plugin = plugin;
        }
        
        /**
         * Brief description of method.
         * 
         * @param player The player to process
         * @return true if successful
         */
        public boolean processPlayer(Player player) {
            // Implementation
        }
    }
  3. Configuration Updates

    • Maintain backward compatibility

    • Use ConfigUpdater class for migrations

    • Document new options thoroughly

  4. Error Handling

    • Use try-catch for external operations

    • Log errors appropriately

    • Provide fallback behavior

Pull Request Process

  1. Create Feature Branch

    git checkout -b feature/your-feature-name
  2. Make Changes

    • Write clean, documented code

    • Add unit tests if applicable

    • Update configuration if needed

  3. Test Thoroughly

    • Test on different Minecraft versions

    • Verify backward compatibility

    • Check edge cases

  4. Submit Pull Request

    • Clear title and description

    • Reference related issues

    • Describe changes made

    • Include testing notes

PR Template:

**Description**
Brief description of changes.

**Type of Change**
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update

**Testing**
- [ ] Tested on Minecraft 1.21.x
- [ ] Configuration migration tested
- [ ] Performance impact assessed

**Related Issues**
Fixes #123

**Screenshots** (if applicable)

4. Add Translations

Help make the plugin accessible worldwide:

  1. Create Language File

    # lang/your_language.yml
    press_to_boost: "Your translation here"
    boost_activated: "Your translation here"
    # ... other messages
  2. Translation Guidelines

    • Keep placeholders ({key}, {latestVersion}, etc.) unchanged

    • Maintain formatting codes (&6, &l, etc.)

    • Preserve the meaning and tone

    • Use proper grammar and spelling

  3. Submit Translation

    • Create PR with new language file

    • Update documentation

    • Test in-game display

5. Improve Documentation

Documentation always needs updates:

  1. Fix Typos and Errors

    • Correct spelling/grammar

    • Update outdated information

    • Clarify confusing sections

  2. Add Examples

    • Configuration examples

    • Use case scenarios

    • Integration guides

  3. Create Tutorials

    • Video guides

    • Step-by-step tutorials

    • Advanced usage guides

6. Test Pre-releases

Help test new versions:

  1. Download pre-release versions

  2. Test in various environments

  3. Report any issues found

  4. Provide feedback on new features

Code Architecture

Project Structure

SpawnElytra/
├── src/
│   └── at/blaxk/spawnelytra/
│       ├── Main.java              # Main plugin class
│       ├── SpawnElytra.java       # Core functionality
│       ├── CommandHandler.java    # Command processing
│       ├── ConfigUpdater.java     # Configuration migration
│       ├── MessageUtils.java      # Message handling
│       ├── ColorUtil.java         # Color formatting
│       ├── PlayerDataManager.java # Player statistics
│       └── SpawnElytraExpansion.java # PlaceholderAPI
├── resources/
│   ├── config.yml
│   ├── plugin.yml
│   └── lang/                      # Language files
└── pom.xml / build.gradle

Development Guidelines

Adding New Features

  1. Plan the Feature

    • Consider configuration options

    • Think about permissions

    • Plan for backward compatibility

  2. Implement

    • Follow existing patterns

    • Add configuration options

    • Update ConfigUpdater (optional)

    • Add language keys

  3. Document Everything

    • Update README.md

    • Add configuration comments

    • Create documentation pages

Performance Considerations

  • Minimize calculations in event handlers

  • Cache frequently used values

  • Use appropriate data structures

  • Avoid blocking operations

Security Considerations

  • Validate all user input

  • Use proper permissions

  • Avoid exposing sensitive data

Release Process

  1. Version Numbering

    • Major: Breaking changes

    • Minor: New features

    • Patch: Bug fixes

  2. Pre-release Testing

    • Test on multiple versions

    • Verify configuration migration

    • Check all features work

  3. Release Checklist

    • Update version numbers

    • Update changelog

    • Create GitHub release

    • Upload to Modrinth

Recognition

Contributors are recognized in:

  • GitHub contributors page

  • Release notes

  • Plugin documentation

  • Community announcements

Thank you for contributing to Spawn Elytra! Every contribution, no matter how small, helps make the plugin better for everyone :D

License

By contributing, you agree that your contributions will be licensed under the project's existing license. (As of writing MIT, might change it just check it here)

Last updated