-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the Supervisor Wiki! This guide will help you understand the different design principles and modules available in the Supervisor project, providing insights for enterprise-level plugin development for Bukkit, Bungee, Velocity, and beyond.
- Model: Represents data objects, where data is stored and maintained. It defines the entities used within the plugin.
- View: Contains commands and menus that users interact with. These are the user-facing components.
- Controller: Acts as a barrier between the view and service layers, managing interactions and the flow of data between them.
- Services: Handles business logic, acts as listeners, and provides an intermediary barrier between controllers and repositories.
- Repository: Stores data and implements custom queries. It is responsible for all interactions with data storage systems.
This pattern allows for better modularization, easy testing, and separation of concerns, making development more organized and manageable.
Below is the list of modules included in the Supervisor project. Only include the ones relevant to your development requirements. Each module serves a specific purpose, from item handling to configuration management and repository integration.
| Module | Group ID | Artifact ID | Stable Version | Dev Version |
|---|---|---|---|---|
| Supervisor Bukkit Item | com.vertmix.supervisor | bukkit-item | 2.0.0 | 2.0.1-SNAPSHOT |
| Supervisor Bukkit Menu | com.vertmix.supervisor | bukkit-menu | 2.0.0 | 2.0.1-SNAPSHOT |
| Supervisor Bukkit | com.vertmix.supervisor | bukkit | 2.0.0 | 2.0.1-SNAPSHOT |
| Supervisor Bungee | com.vertmix.supervisor | bungee | 2.0.0 | 2.0.1-SNAPSHOT |
| Supervisor Configuration JSON | com.vertmix.supervisor | configuration-json | 2.0.0 | 2.0.1-SNAPSHOT |
| Supervisor Configuration TOML | com.vertmix.supervisor | configuration-toml | 2.0.0 | 2.0.1-SNAPSHOT |
| Supervisor Configuration YAML | com.vertmix.supervisor | configuration-yml | 2.0.0 | 2.0.1-SNAPSHOT |
| Supervisor Configuration | com.vertmix.supervisor | configuration | 2.0.0 | 2.0.1-SNAPSHOT |
| Supervisor Core | com.vertmix.supervisor | core | 2.0.0 | 2.0.1-SNAPSHOT |
| Supervisor Loader | com.vertmix.supervisor | loader | 2.0.0 | 2.0.1-SNAPSHOT |
| Supervisor Reflection | com.vertmix.supervisor | reflection | 2.0.0 | 2.0.1-SNAPSHOT |
| Supervisor Repository | com.vertmix.supervisor | repository | 2.0.0 | 2.0.1-SNAPSHOT |
| Supervisor Repository Bukkit | com.vertmix.supervisor | repository-bukkit | 2.0.0 | 2.0.1-SNAPSHOT |
| Supervisor Repository Bukkit Mongo | com.vertmix.supervisor | repository-bukkit-mongo | 2.0.0 | 2.0.1-SNAPSHOT |
| Supervisor Repository JSON | com.vertmix.supervisor | repository-json | 2.0.0 | 2.0.1-SNAPSHOT |
| Supervisor Repository Mongo | com.vertmix.supervisor | repository-mongo | 2.0.0 | 2.0.1-SNAPSHOT |
| Supervisor Velocity | com.vertmix.supervisor | velocity | 2.0.0 | 2.0.1-SNAPSHOT |
To set up the Supervisor modules in your project, you can use Maven or Gradle, depending on your preference.
Add the following dependencies to your pom.xml file:
<dependency>
<groupId>com.vertmix.supervisor</groupId>
<artifactId>bukkit</artifactId>
<version>2.0.0</version>
</dependency>Add the following dependency to your build.gradle file:
implementation 'com.vertmix.supervisor:bukkit:2.0.0'Add the following dependency to your build.gradle.kts file:
implementation("com.vertmix.supervisor:bukkit:2.0.0")Here's an example of how to structure a Spigot plugin using the described MVC pattern.
myplugin/
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/example/myplugin/
│ │ │ ├── MyPlugin.java // Main plugin class (entry point)
│ │ │ ├── controller/
│ │ │ │ ├── ItemController.java
│ │ │ │ └── MenuController.java
│ │ │ ├── view/
│ │ │ │ ├── command/
│ │ │ │ ├── DummyCommand.java
│ │ │ │ ├── menu/
│ │ │ │ ├── DummyMenu.java
│ │ │ ├── model/
│ │ │ │ ├── CustomItem.java
│ │ │ ├── repository/
│ │ │ │ ├── PlayerDataRepository.java
│ │ │ └── service/
│ │ │ ├── ItemService.java
│ └── resources/
│ └── plugin.yml // Plugin configuration file
- MyPlugin.java: Main entry point for the plugin. Initializes services and controllers.
- controller/: Handles commands and menu interactions.
- model/: Contains the data objects.
- view/: Objects displayed to a user
- repository/: Stores the data and handles any data queries.
- service/: Contains business logic, connecting the controller and repository layers.
This structure maintains separation of concerns, allowing the plugin to be easily maintained and extended.
If you're interested in contributing to the Supervisor project, feel free to submit pull requests or raise issues on GitHub. We welcome suggestions and improvements from the community.
The Supervisor project is licensed under the MIT License. See the LICENSE file for more information.
For further questions or suggestions, contact us at support@vertmix.com.
Thank you for being part of the Supervisor community!