fix: update /core team leave error message for admin-only commands

The "you're chef, transfer first" message still pointed to the old
/core team transfer <player> signature (which used to target the chef's
own team). Since transfer is now admin-only (/core team transfer <team>
<player>), a player cannot execute it themselves. Redirects them to
ask an admin for /core team setleader or /core team delete instead.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Antone Barbaud
2026-06-09 15:08:23 +02:00
parent 8b7cad3fce
commit 5385b6e674
@@ -36,7 +36,7 @@ public class TeamLeaveSubCommand extends SubCommand {
}
if (team.isLeader(player.getUniqueId())) {
return CommandResult.failure(
"Vous êtes le chef. Transférez le leadership avec /core team transfer <player>, ou dissolvez avec /core team delete.");
"Vous êtes le chef. Demandez à un admin de réassigner le leadership (/core team setleader) ou de dissoudre l'équipe.");
}
service.removeMember(team.getId(), player.getUniqueId());
return CommandResult.success("Vous avez quitté l'équipe " + team.getName() + ".");