How minevn/minevn-library works
Main Components
• Core Library Modules: This includes the centralized utility code (found under minevnlib-master) responsible for database access, connection pooling (supporting H2, MySQL, MariaDB via HikariCP), scheduling (CronTimer), and other common utilities.
• Bukkit Module (minevnlib-bukkit): Contains classes for plugin initialization on Bukkit-based servers, the GUI API (for menu handling, inventory GUIs), command DSL, event listeners, and configuration helpers.
• Bungee Module (minevnlib-bungee): Responsible for providing similar library functionality within the BungeeCord environment.
• Plugin Tests (minevnlib-plugin): Includes unit tests that validate core functionalities.
• Build & CI/CD Tools: The Gradle build files, GitHub workflows, and configuration files indicate a continuous integration pipeline and build process used to compile and package the project.
Component Relationships and Interactions
• The Core Library (minevnlib-master) provides common functions and database operations; both the Bukkit and Bungee modules depend on these common utilities.
• The minevnlib-bukkit module implements the GUI API, command handling, and event listening functionality by extending from a custom superclass (MineVNPlugin) that itself is part of the broader library architecture.
• How the migration component (BukkitDBMigrator) interacts with the database connection pool (from the core library). Also, include the file system structure illustration for migrations (e.g., resource/db/migrations and the SQL files named by version).
Architectural Patterns and Design Principles
• MVC Orientation: Clearly denote separation between controllers (command/event handling in the Bukkit module), views (GUI API elements), and model (DAO and database schema management).
• Dependency Inversion: Indicate that the higher-level modules (Bukkit/Bungee) depend on abstractions provided by the core library, easing integration and maintenance.
• Build/Deployment Pipeline: Optionally note the CI configuration (.github/workflows) for build automation.
Relevant Technologies and Frameworks
• Programming Language: Kotlin (with interoperability to Java)
• Database Connections: HikariCP for connection pooling and support for H2, MySQL, MariaDB.
• External Libraries: Gson for JSON operations and any other libraries referenced in the README.
• Minecraft Server Versions: A note indicating that the library has been tested on Minecraft 1.12.2, 1.20.4, etc.
• Build Tools: Gradle (with both Kotlin script files and wrapper scripts).
Specific Elements
• Detail on Interaction Points: Where the system supports transactions and migrations, include annotations or callouts illustrating these design elements.