How auxilor/eco works
Main Components
• API Layer (eco-api): This module exposes all the public APIs that developers will use. It contains interfaces, command APIs, configuration abstractions, data storage interfaces, GUI/placeholder APIs, and more.
• Core Modules (eco-core): This umbrella module is further subdivided:
• core-backend & core-backend-modern: Hosts business logic including commands, configurations, data processing, extension APIs, and integration management.
• core-nms: Contains version-specific code and NMS (net.minecraft.server) abstractions that handle low-level operations, entity control, packet injection, and other server-dependent functionalities. Notice the multiple directories for specific Minecraft versions (v1_17_R1, v1_18_R1, …, v1_21_4, etc.).
• core-plugin: Works as the entry point for the plugin. It integrates the eco framework into the Spigot environment by wiring up event listeners, command registration, and plugin lifecycle management.
• core-proxy: Acts as an abstraction layer to provide compatibility and adapt functionalities for different server versions.
• Lib Directory: Contains external dependencies and other plugin integrations such as DeluxeMenus, CMI, bStats, and other third-party plugins that eco can integrate with.
• Configuration, Documentation, and Gradle Build Files: Provide the glue that ties together building, continuous integration (such as GitHub workflows), and dependency management.
How Components Interact
• The API layer calls into the core modules to execute commands, manage configurations, handle persistence (supporting YAML, MySQL, MongoDB), and control in-game entities.
• The core-backend modules implement the business logic; they call on the NMS abstractions in core-nms to interact with the server internals (packets, entities, etc.) while remaining largely version-agnostic.
• The core-plugin module is where the eco framework is “bootstrapped” into Spigot. It registers events (e.g., player interactions, entity events, GUI interactions) and integrates with the proxy layer to manage version-specific behavior.
• A separate proxy layer (core-proxy) cleanly isolates version-specific implementations so that interface changes in the NMS do not bloat higher-level modules.
• External plugins (as noted in the libs folder) integrate with eco’s extension API to add additional features such as custom recipes, economy systems, price integrations, or integration with popular plugins like DeluxeMenus, CMI, and more.
Architectural Patterns and Design Principles
• Modularization: The project is extremely modular with clear separation between public APIs and internal implementations.
• Abstraction over Version-Specific Code: The proxy and NMS modules encapsulate the complexities of working with multiple Minecraft server versions.
• Dependency Injection & Extension: The framework supports fluent dependency injection for keys, metadata values, etc., and also an extension API so that plugins for plugins can be developed.
• Layered Architecture: With distinct layers (presentation via eco-api, business logic in eco-core, compatibility handling via core-nms and core-proxy, and integration through eco-plugin), the system is well-separated by concerns.
• Event-Driven / Reactive Design: Several modules (such as packet API and event listeners) adopt event-driven architectures.