Initialisation complète de la bibliothèque betterMcCommands (DSL, arguments typés, cycle de vie des événements, injection dynamique CommandMap)
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
# 📜 Instructions & Consignes du Projet - betterMcCommands
|
||||
|
||||
Ce document consigne les directives d'architecture, règles de développement et spécifications fonctionnelles du projet **betterMcCommands**.
|
||||
|
||||
---
|
||||
|
||||
## 🎯 1. Vision du Projet
|
||||
**betterMcCommands** est une bibliothèque Java conçue pour créer, structurer et gérer des commandes Minecraft de façon hautement dynamique, typée et événementielle.
|
||||
|
||||
---
|
||||
|
||||
## 📐 2. Règles & Standards de Développement
|
||||
|
||||
### 🔹 Conception du Code
|
||||
* **Méthodes & Logique Métier d'Abord** : L'arbre de commande, le parsing des arguments et le système d'événements doivent être totalement découplés du moteur Bukkit/Paper pour permettre une testabilité unitaire à 100%.
|
||||
* **Dynamisme & Modularité** : Injection sans déclaration `plugin.yml`, enregistrement et dé-enregistrement à chaud.
|
||||
* **Documentation Obligatoire** : **Chaque classe et méthode** doit comporter une Javadoc détaillée explicitant son rôle, ses paramètres (`@param`), sa valeur de retour (`@return`) et ses exceptions (`@throws`).
|
||||
* **Gestion des Textes & Couleurs** : Intégration native de **Kyori Adventure & MiniMessage** avec compatibilité pour les codes couleur legacy.
|
||||
|
||||
---
|
||||
|
||||
## 🗂️ 3. Organisation des Packages
|
||||
|
||||
```
|
||||
fr.luc.bettermccommands/
|
||||
├── BetterMcCommands.java (Manager principal & Façade d'accès)
|
||||
├── api/ (Interfaces et contrats publics)
|
||||
│ ├── Command.java
|
||||
│ ├── CommandNode.java
|
||||
│ ├── CommandContext.java
|
||||
│ ├── CommandExecutor.java
|
||||
│ ├── CommandSenderType.java
|
||||
│ ├── CommandResult.java
|
||||
│ └── suggestion/
|
||||
│ ├── Suggestion.java
|
||||
│ └── SuggestionProvider.java
|
||||
├── builder/ (Fluent Builder DSL)
|
||||
│ ├── AbstractCommandBuilder.java
|
||||
│ ├── CommandBuilder.java
|
||||
│ └── SubCommandBuilder.java
|
||||
├── argument/ (Système d'arguments typés)
|
||||
│ ├── CommandArgument.java
|
||||
│ ├── ArgumentType.java
|
||||
│ ├── Arguments.java
|
||||
│ ├── type/
|
||||
│ │ ├── StringArgument.java
|
||||
│ │ ├── IntegerArgument.java
|
||||
│ │ ├── DoubleArgument.java
|
||||
│ │ ├── BooleanArgument.java
|
||||
│ │ ├── EnumArgument.java
|
||||
│ │ ├── PlayerArgument.java
|
||||
│ │ ├── OfflinePlayerArgument.java
|
||||
│ │ ├── WorldArgument.java
|
||||
│ │ ├── LocationArgument.java
|
||||
│ │ └── DurationArgument.java
|
||||
│ └── registry/
|
||||
│ └── ArgumentTypeRegistry.java
|
||||
├── event/ (Moteur d'événements & Lifecycle)
|
||||
│ ├── CommandEvent.java
|
||||
│ ├── CancellableCommandEvent.java
|
||||
│ ├── CommandPreExecuteEvent.java
|
||||
│ ├── CommandPostExecuteEvent.java
|
||||
│ ├── CommandPermissionDeniedEvent.java
|
||||
│ ├── CommandSyntaxErrorEvent.java
|
||||
│ ├── CommandArgumentParseException.java
|
||||
│ ├── CommandTabCompleteEvent.java
|
||||
│ ├── CommandCooldownEvent.java
|
||||
│ ├── CommandEventListener.java
|
||||
│ ├── CommandEventManager.java
|
||||
│ └── annotation/
|
||||
│ └── CommandEventHandler.java
|
||||
├── cooldown/ (Gestionnaire de Cooldowns)
|
||||
│ └── CooldownManager.java
|
||||
├── platform/ (Ponts plateformes)
|
||||
│ ├── CommandPlatformAdapter.java
|
||||
│ └── paper/
|
||||
│ ├── PaperCommandMapInjector.java
|
||||
│ └── PaperCommandWrapper.java
|
||||
└── demo/ (Exemples & Démonstrations)
|
||||
├── DemoPlugin.java
|
||||
└── commands/
|
||||
├── DemoBaseCommand.java
|
||||
└── DemoListener.java
|
||||
```
|
||||
Reference in New Issue
Block a user