Developer Guide
Table of Contents
Introduction
Prerequisites
What You'll Learn
Development Environment Setup
Step 1: Install Java 21
Step 2: Install Git
Step 3: Clone Repository
Step 4: Set Up IDE
IntelliJ IDEA (Recommended)
Eclipse
Step 5: Verify Setup
Project Structure
Module Breakdown
API Module
Plugin Module
Building from Source
Using Gradle
Build Outputs
Running Tests
Publishing to Local Maven
API Overview
Core Interfaces
NexAuthPlugin
EventProvider
ReadDatabaseProvider
WriteDatabaseProvider
ReadWriteDatabaseProvider
AuthorizationProvider
CryptoProvider
Event System
Event Types
Event Structure
CancellableEvent
Extending NexAuth
Creating a Custom Plugin Extension
Step 1: Create Project
Step 2: Setup build.gradle
Step 3: Implement Integration
Creating a BungeeCord Plugin with NexAuth Integration
Step 1: Create bungee.yml
Step 2: Create Plugin Class
Creating a Paper Plugin with NexAuth Integration
Step 1: Create plugin.yml
Step 2: Create Plugin Class
Custom Database Providers
Example: Redis-Based Provider
Step 1: Implement DatabaseConnector
Step 2: Implement ReadDatabaseProvider
Step 3: Implement WriteDatabaseProvider
Step 4: Combine Providers
Step 5: Register Provider
Step 6: Configure in config.conf
Example: File-Based Provider (JSON)
Custom Event Handlers
Example: Reward System
Example: Integration with Discord
Creating Custom Events
Custom Crypto Providers
Example: Custom Pepper-Based Hashing
Register Custom Crypto Provider
Advanced: Memory-Hard KDF
Plugin Integration
Integration Checklist
Example: ChestShop Integration
Integration Example: Vault Economy
Testing Integration
Testing
Unit Testing Database Providers
Mock NexAuth Plugin for Testing
Integration Testing
Testing Utilities
Contributing
Contribution Guidelines
Types of Contributions
Before You Start
Development Workflow
Code Style
Commit Message Format
Pull Request Template
Running Tests
Building Documentation
Code Review Process
Getting Help
Best Practices
Design Patterns
Use Observer Pattern for Events
Use Strategy Pattern for Providers
Use Factory Pattern for Object Creation
Error Handling
Handle Exceptions Gracefully
Use Specific Exceptions
Performance
Use Async Operations
Batch Database Operations
Cache Frequently Used Data
Security
Never Store Plaintext Passwords
Validate All Inputs
Use Prepared Statements
Code Organization
Keep Methods Small and Focused
Use Dependency Injection
Document Public APIs
Testing
Write Unit Tests
Use Mocks for Testing
Test Integration Points
Logging
Use Appropriate Log Levels
Include Context in Logs
Configuration
Use Type-Safe Configuration
Validate Configuration
Example Projects
Official Extensions
Community Extensions
Resources
Documentation
APIs and Libraries
Tools
Testing
Support
Getting Help
Professional Support
Last updated
