refactor: split team/player/message into impl/ and exception/ subpackages

Each domain now has:
- Top-level package: contracts (interfaces, entities, enums, values, events).
- exception/ subpackage: exception hierarchy.
- impl/ subpackage: implementations CR-Core ships by default, swappable by
  a game plugin if needed.

Moved (FQN changes for consumers):
- fr.luc.crcore.team.TeamException (+ AlreadyExists, NotFound, Access)
    → fr.luc.crcore.team.exception.*
- fr.luc.crcore.team.TeamServiceImpl, BukkitEventFiringTeamServiceImpl,
  InMemoryTeamRepository, SqliteTeamRepository
    → fr.luc.crcore.team.impl.*
- fr.luc.crcore.player.PlayerException, PlayerProfileNotFoundException
    → fr.luc.crcore.player.exception.*
- fr.luc.crcore.player.PlayerProfileServiceImpl,
  BukkitEventFiringPlayerProfileServiceImpl,
  InMemoryPlayerProfileRepository, SqlitePlayerProfileRepository
    → fr.luc.crcore.player.impl.*
- fr.luc.crcore.message.YamlMessagesService
    → fr.luc.crcore.message.impl.YamlMessagesService

Unchanged top-level packages: database/, command/, common/ (already small
and well-organized). Events stay where they were (already in event/
subpackages).

setup.md tree updated to reflect the new layout. decisions.md logs the
rationale (consumer-facing FQNs, separation between contract and impl).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Antone Barbaud
2026-06-10 10:54:35 +02:00
parent 4651ccbe69
commit 923f48ffc7
20 changed files with 183 additions and 68 deletions
+52 -44
View File
@@ -211,50 +211,58 @@ CitesPlugin/ # dossier IntelliJ (renommer plus t
│ ├── TeamScoreSubCommand.java # /core team score (admin)
│ ├── TeamTopSubCommand.java # /core team top
│ └── TeamSetSpawnSubCommand.java # /core team setspawn
├── team/
│ ├── Team.java
── TeamMember.java
├── TeamRole.java
├── TeamColor.java
│ ├── TeamVisibility.java
│ ├── TeamRanking.java # record
│ ├── TeamRepository.java
│ ├── InMemoryTeamRepository.java
│ ├── SqliteTeamRepository.java
│ ├── TeamService.java
│ ├── TeamServiceImpl.java
│ ├── BukkitEventFiringTeamServiceImpl.java # impl par défaut
│ ├── TeamException.java
│ ├── TeamAlreadyExistsException.java
│ ├── TeamNotFoundException.java
│ ├── TeamAccessException.java
└── event/ # Bukkit events team
├── TeamEvent.java # base
├── TeamCreateEvent.java
├── TeamDissolveEvent.java
├── TeamMemberAddEvent.java
├── TeamMemberRemoveEvent.java
── PlayerJoinTeamEvent.java
├── TeamLeadershipTransferEvent.java
├── TeamVisibilityChangeEvent.java
├── TeamScoreChangeEvent.java
── TeamSpawnPointChangeEvent.java
└── player/
── PlayerProfile.java
├── PlayerRanking.java
├── PlayerProfileRepository.java
├── InMemoryPlayerProfileRepository.java
── SqlitePlayerProfileRepository.java
── PlayerProfileService.java
├── PlayerProfileServiceImpl.java
├── BukkitEventFiringPlayerProfileServiceImpl.java
├── PlayerException.java
├── PlayerProfileNotFoundException.java
── event/ # Bukkit events player
├── PlayerProfileEvent.java
├── PlayerProfileCreateEvent.java
├── PlayerProfileDeleteEvent.java
└── PlayerScoreChangeEvent.java
├── message/ # service de messages YAML
│ ├── MessagesService.java # interface (contrat public)
── impl/
└── YamlMessagesService.java # impl par défaut
├── team/ # contrats + entités au top
│ ├── Team.java # entité
│ ├── TeamMember.java # entité
│ ├── TeamRole.java # enum
│ ├── TeamColor.java # enum
│ ├── TeamVisibility.java # enum
│ ├── TeamRanking.java # value
│ ├── TeamService.java # interface
│ ├── TeamRepository.java # interface
│ ├── event/ # Bukkit events team
├── TeamEvent.java # base
├── TeamCreateEvent.java
├── TeamDissolveEvent.java
│ ├── TeamMemberAddEvent.java
├── TeamMemberRemoveEvent.java
├── PlayerJoinTeamEvent.java
├── TeamLeadershipTransferEvent.java
├── TeamVisibilityChangeEvent.java
├── TeamScoreChangeEvent.java
── TeamSpawnPointChangeEvent.java
├── exception/ # hiérarchie d'exceptions team
├── TeamException.java # base
├── TeamAlreadyExistsException.java
── TeamNotFoundException.java
│ │ └── TeamAccessException.java
── impl/ # implémentations swappables
├── TeamServiceImpl.java # service de base
├── BukkitEventFiringTeamServiceImpl.java # impl par défaut
├── InMemoryTeamRepository.java # repo en mémoire
── SqliteTeamRepository.java # repo SQLite write-through
── player/ # contrats + entités au top
├── PlayerProfile.java # entité
├── PlayerRanking.java # value
├── PlayerProfileService.java # interface
├── PlayerProfileRepository.java # interface
── event/ # Bukkit events player
├── PlayerProfileEvent.java
├── PlayerProfileCreateEvent.java
├── PlayerProfileDeleteEvent.java
└── PlayerScoreChangeEvent.java
├── exception/
│ ├── PlayerException.java
│ └── PlayerProfileNotFoundException.java
└── impl/
├── PlayerProfileServiceImpl.java
├── BukkitEventFiringPlayerProfileServiceImpl.java
├── InMemoryPlayerProfileRepository.java
└── SqlitePlayerProfileRepository.java
```
## Fichier messages