How cadox8/pa works
Main Components
• PA-Core: This is the central module that contains shared functionality and APIs. It handles core commands, user management, and communication with the MySQL database.
• PA-Bungee: Acts as the network layer using BungeeCord to coordinate server transitions between different game modes.
• Game Mode Plugins: Several Maven modules represent individual game modes (e.g., PA-Antium, PA-Creativo, PA-Lobby, PA-NexusSiege, PA-Rage, PA-SafariNet, PA-Survival, PA-TOA). Each contains its own plugin.yml (registering as a Spigot plugin) along with commands, events, tasks, managers, and specific business logic.
• External Dependencies & Third-Party Libraries: These include APIs and utilities like Inventivetalent’s BossBar and ParticleAPI, Reflection utilities, and other libraries (e.g., ViaVersion) as noted in the README.
• Database: A MySQL database is used for storing user data (passwords, game stats, etc.), with a provided schema (mysql.sql).
Relationships and Interactions
• The PA-Core module acts as an API provider that is deployed on every server, enabling consistent user management and data handling.
• PA-Bungee connects to and routes players between the various game mode servers. It must interact with external services (BungeeCord proxy) and provide communication channels.
• Each game mode plugin (for example, PA-Lobby, PA-Survival, etc.) interfaces with PA-Core for shared functionality while implementing its own commands, events, and game-specific logic.
• All modules interact with the MySQL database via PA-Core’s MySQL utility class to read/write user and game data.
• External libraries provide extended functionality (e.g., in-game visual effects, reflection-based dynamic operations).
Architectural Patterns and Design Principles
• Plugin Architecture: Each game mode module is self-contained with its own event listeners, commands, and managers—illustrate these as distinct blocks while noting they share common infrastructure provided by PA-Core.
• Layered Interaction: Separate the network (PA-Bungee) from the application logic (game mode modules and PA-Core) and the data layer (MySQL).
• Reuse and Extension Points: Clearly mark the shared APIs in PA-Core and any “extension” hooks where game modes build upon core functionality.
• Use of External APIs: Emphasize integration points with third-party libraries such as Inventivetalent tools and ViaVersion, which may be shown as external components that plug into PA-Core and individual game mode modules.