ffc77c4213
Pure Maven library for CR Minecraft game plugins, targeting Paper 1.16.5. Common abstractions (fr.luc.crcore.common): Identifiable, Named, ScoreHolder, AbstractEntity, Repository<T>. Team domain (fr.luc.crcore.team): Team entity with name/tag/color/leader/ visibility (PUBLIC|PRIVATE)/members/scores/spawn point, TeamMember, TeamRole/TeamColor/TeamVisibility enums, TeamRanking record, TeamService with overridable hooks (factories, validations, lifecycle events), in-memory repository, dedicated exception hierarchy. Player domain (fr.luc.crcore.player): PlayerProfile with named scores per player, PlayerProfileService with auto-creation, individual rankings, exception hierarchy. Both Team and PlayerProfile implement ScoreHolder. Command framework (fr.luc.crcore.command): Command interface, AbstractCommand base, BaseCommand (CommandExecutor + TabCompleter), SubCommand, CommandContext, CommandResult, ArgumentType<T> + ArgumentTypes catalogue (STRING, INTEGER, DOUBLE, BOOLEAN, ONLINE_PLAYER, enumOf, choice). Docs (docs/) is the single source of truth: README, setup, features, decisions log, and 6 PlantUML diagrams (team class/sequence/activity/join, player class, command class). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
41 lines
791 B
Plaintext
41 lines
791 B
Plaintext
@startuml team-create-activity
|
|
title CR-Core — Create Team (activity diagram)
|
|
|
|
start
|
|
|
|
:Player runs /team create <name> <tag> <color> [visibility];
|
|
|
|
if (Name already in use?) then (yes)
|
|
:Reply "team name already taken";
|
|
stop
|
|
else (no)
|
|
endif
|
|
|
|
if (Tag already in use?) then (yes)
|
|
:Reply "team tag already taken";
|
|
stop
|
|
else (no)
|
|
endif
|
|
|
|
if (Player already in a team?) then (yes)
|
|
:Reply "you already belong to a team";
|
|
stop
|
|
else (no)
|
|
endif
|
|
|
|
if (Color valid?) then (no)
|
|
:Reply "unknown color";
|
|
stop
|
|
else (yes)
|
|
endif
|
|
|
|
:Create Team(id = randomUUID, name, tag, color, leaderId = playerId, visibility);
|
|
note right: visibility defaults to PRIVATE\nif not specified
|
|
:Add player as TeamMember(role = LEADER);
|
|
:Persist via TeamRepository.save(team);
|
|
:Reply "team created";
|
|
|
|
stop
|
|
|
|
@enduml
|