Class AdminToggleSubCommand
java.lang.Object
fr.luc.crcore.util.command.AbstractCommand
fr.luc.crcore.util.command.SubCommand
fr.luc.crcore.features.moderation.command.AdminToggleSubCommand
- All Implemented Interfaces:
Command
/core admin — toggle on/off du mode modération pour le joueur
exécutant.
Permission : crcore.admin. Player-only.
Squelette : un simple toggle. Pas d'arg pour basculer un autre
joueur (à ajouter plus tard, ex. /core admin <player>).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final MessagesServiceprotected final ModerationService -
Constructor Summary
ConstructorsConstructorDescriptionAdminToggleSubCommand(ModerationService moderation, MessagesService messages) -
Method Summary
Methods inherited from class AbstractCommand
addAlias, addSubCommand, argument, buildContext, buildDefaultUsage, checkAccess, description, dispatch, findSubCommand, getAliases, getDescription, getName, getPermission, getRequiredArgumentCount, getSubCommands, getTotalArgumentCount, getUsage, hasSubCommands, isPlayerOnly, listSubCommands, optionalArgument, permission, playerOnly, replaceSubCommand, tabComplete, usage
-
Field Details
-
moderation
-
messages
-
-
Constructor Details
-
AdminToggleSubCommand
-
-
Method Details
-
execute
Description copied from class:AbstractCommandLogique métier de la commande. Override par les sous-classes.Comportement par défaut :
- Si cette commande a des sous-commandes → affiche la liste (aide).
- Sinon → renvoie
CommandResult.invalidUsage().
- Specified by:
executein interfaceCommand- Overrides:
executein classAbstractCommand
-