How thomasmny/buildsystem works
Main Components
• Plugin Entry Point/Core Layer:
– This is represented by the buildsystem-core package. It includes the BuildSystem class, command handlers, event listeners, configuration managers, and navigators. It’s the “brain” of the plugin.
• Abstraction/Adapter Layer:
– Under buildsystem-abstraction, you have separate directories for each Minecraft version adapter (e.g., adapter-1_12, adapter-1_13, etc.) plus a common folder. This layer encapsulates version-specific behavior, allowing the core to interact with different Minecraft API versions.
• Build Configuration & Plugin Setup:
– The buildSrc directory and Gradle scripts (settings.gradle.kts, build.gradle.kts files) handle build configurations and dependency management.
• External Integrations:
– There are expansion packages for external APIs (e.g., LuckPerms and PlaceholderAPI) that integrate with services for permissions and dynamic placeholders.
• Resource and Configuration Files:
– The resources in buildsystem-core/src/main/resources (e.g., config.yml and plugin.yml) provide runtime configuration for the plugin.
Relationships and Interactions
• The Plugin Entry Point (core) initializes and delegates functions to sub-components:
– It registers commands (via classes in buildsystem-core/command) and listeners (under buildsystem-core/listener) with the server’s event system.
– It then interacts with the abstraction layer to adapt behavior based on the running Minecraft version.
• The Abstraction Layer provides version-specific implementations for core functionality (e.g., handling custom block and game rule logic within buildsystem-abstraction/adapter-<version>).
• There is a clear separation between user interface elements:
– The navigators (the interactive GUI elements found in buildsystem-core/navigator) and modification inventories are isolated from lower-level logic but interact via event listeners.
• External APIs like LuckPerms and PlaceholderAPI are integrated as expansion modules. They plug into the core to extend functionality (e.g., permissions calculations or dynamic placeholders).
Architectural Patterns
• Modularity:
– The project uses a modular approach with a distinct core and dedicated abstraction modules.
• Adapter/Abstraction Pattern:
– The multiple adapter directories indicate the use of the adapter pattern, isolating version-specific logic.
• Event-Driven Programming:
– The use of listeners (in buildsystem-core/listener) shows a reliance on an event-driven architecture to handle in-game events.
• Command and Navigator Patterns:
– Commands and subcommands in buildsystem-core/command and navigators provide structured, class-based command handling and user interaction.
Relevant Technologies and Frameworks
• Java-based development (with Kotlin files for build configuration).
• Gradle for building and dependency management.
• The Bukkit/Spigot API for interfacing with Minecraft servers.
• Integration with third-party plugins such as LuckPerms and PlaceholderAPI.
• Use clear labels for each component:
– Label blocks “Plugin Core,” “Adapter Layer (Version 1_12, 1_13, etc.),” “Command Manager,” “Event Dispatcher,” “Configuration Manager,” “Navigator/UI,” and “External Integrations.”
• Notes or annotations:
– Mark build system interactions (e.g., “Gradle Build Scripts” in a separate build configuration block).