docs: document MessagesService — single per-plugin YAML, defaults in jar

features.md: new section 8 "Service de messages" with the single-file model,
two-layer in-memory (jar defaults + user file), API examples,
template-override mechanism, and override-the-impl extension point.
Bootstrap section renumbered to 9.

decisions.md: new decision logging the choice of MessagesService design
(YAML, single per-plugin file, in-jar fallback for new keys, template
priority from the game plugin's own resource, programmatic set() for
dynamic cases).

README.md: feature list mentions externalized messages; diagrams index
adds messages-class-diagram.puml.

setup.md: new "Fichier messages" section explaining the file location,
how to seed it from a game plugin's bundled template, and the API for
hot reload / extras / programmatic set().

New diagram: docs/diagrams/messages-class-diagram.puml — MessagesService
interface, YamlMessagesService impl, link to CRCore, with explanatory
note on the two-source merge and template fallback at first boot.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Antone Barbaud
2026-06-09 16:06:19 +02:00
parent f92f22f6c8
commit 4651ccbe69
5 changed files with 242 additions and 1 deletions
+5
View File
@@ -26,6 +26,10 @@ d'initialisation côté plugin de jeu :
- **Persistance SQLite** — wrapper `Database` + `TableBuilder` fluide,
repositories SQLite write-through, table custom en 2 lignes pour les
plugins downstream.
- **Messages externalisés** — `MessagesService` charge un seul fichier
YAML `<plugin>-messages.yml` dans le dataFolder du plugin de jeu,
avec defaults CR-Core en fallback. L'admin édite un seul fichier,
placeholders nommés, codes couleur `&` natifs.
- **Bootstrap unique** — `new CRCore(this).enable()` dans le `onEnable()`
du plugin de jeu, et tout est branché.
@@ -50,6 +54,7 @@ d'initialisation côté plugin de jeu :
| [builtin-commands-diagram.puml](diagrams/builtin-commands-diagram.puml) | Classe | Arbre des commandes `/core team ...` |
| [events-diagram.puml](diagrams/events-diagram.puml) | Classe | Évènements Bukkit team + player |
| [database-diagram.puml](diagrams/database-diagram.puml) | Classe | Wrapper SQLite + table builder |
| [messages-class-diagram.puml](diagrams/messages-class-diagram.puml) | Classe | Service de messages YAML |
| [bootstrap-sequence.puml](diagrams/bootstrap-sequence.puml) | Séquence | `CRCore.enable()` côté plugin de jeu |
## Conventions