How jaimss/moducore works
Based on our review of the file tree and README, this project is a modular Minecraft server plugin (ModuCore) that provides a core API as well as several integrations – most notably with Bukkit/Spigot for in-game functionality and Discord for external interaction. It is clearly built to be highly configurable and modular, with a separate module for shared/common code, one for the API (core functions and events), one for the Bukkit implementation (commands, listeners, GUI, metrics, etc.), and one for Discord (bot commands, configuration, integrations).
Major Components
• API Module: Contains the main core functions for ModuCore. It defines data classes (like Kit, LocationHolder, and PlayerData), events (chat, teleport, economy events, etc.), and the developer-facing API.
• Bukkit Module: Implements the plugin for the Minecraft server. Here you have commands (for managing kits, teleportation, chat, and more), event listeners, configuration, and managerial functions (such as economy, kit, location, and player management) that link directly to the Bukkit server.
• Common Module: Contains shared utility code, common constants, functions, messaging, and tests. It helps ensure code reuse throughout the project.
• Discord Module: Provides Discord bot functionality. It manages Discord-related commands, integrations, bot configuration, and cross-service communication that link the Minecraft server to Discord channels.
• Build/Deployment & Assets: Gradle build files, assets (such as images and configuration files), and CI/CD integration (as shown in the .github and gradle directories).
Relationships and Interactions
• The Common module is a shared library that supports functionality across other modules. Represent it as a central component linked (or “used by”) all other modules.
• The Bukkit module interacts with the Minecraft server environment (commands, events, listeners, GUIs) and integrates with external libraries (e.g., bStats and PlaceholderAPI). Indicate external connections for these integrations.
• The Discord module interacts with the external Discord service via its API. It pulls information from or pushes events to the API module to keep the two in sync.
• These modules may also communicate with each other either directly (e.g., common utility functions, shared managers) or indirectly via the API layer.
Architectural Patterns and Design Principles
• Modularity: Clearly indicate that features (modules) can be enabled or disabled “on the fly” without a restart. This decoupling should be reflected by distinct component boundaries.
• Manager/Facade Pattern: The presence of various managers (for player, kit, location, economy, etc.) within both the API and Bukkit modules suggests a pattern where each feature is encapsulated behind a facade for simplified interaction.
• Build & Integration: Although not a runtime component, note that Gradle and CI/CD workflows shown in the file tree support continuous integration and modular building.