Class SingleCommand
java.lang.Object
me.lucko.luckperms.common.command.abstraction.Command<Void>
me.lucko.luckperms.common.command.abstraction.SingleCommand
- Direct Known Subclasses:
ApplyEditsCommand, BulkUpdateCommand, CreateGroup, CreateTrack, DeleteGroup, DeleteTrack, EditorCommand, ExportCommand, ImportCommand, InfoCommand, ListGroups, ListTracks, NetworkSyncCommand, ReloadConfigCommand, SearchCommand, SyncCommand, TranslationsCommand, TreeCommand, TrustEditorCommand, VerboseCommand
-
Constructor Summary
ConstructorsConstructorDescriptionSingleCommand(CommandSpec spec, String name, CommandPermission permission, Predicate<Integer> argumentCheck) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidexecute(LuckPermsPlugin plugin, Sender sender, Void ignored, ArgumentList args, String label) abstract voidexecute(LuckPermsPlugin plugin, Sender sender, ArgumentList args, String label) voidsendDetailedUsage(Sender sender, String label) Sends a detailed command usage message to the Sender.voidSends a brief command usage message to the Sender.Methods inherited from class Command
getArgs, getArgumentCheck, getDescription, getName, getPermission, getSpec, getUsage, isAuthorized, shouldDisplay, tabComplete
-
Constructor Details
-
SingleCommand
public SingleCommand(CommandSpec spec, String name, CommandPermission permission, Predicate<Integer> argumentCheck)
-
-
Method Details
-
execute
public final void execute(LuckPermsPlugin plugin, Sender sender, Void ignored, ArgumentList args, String label) throws CommandException - Specified by:
executein classCommand<Void>- Throws:
CommandException
-
execute
public abstract void execute(LuckPermsPlugin plugin, Sender sender, ArgumentList args, String label) throws CommandException - Throws:
CommandException
-
sendUsage
Description copied from class:CommandSends a brief command usage message to the Sender. If this command has child commands, the children are listed. Otherwise, a basic usage message is sent. -
sendDetailedUsage
Description copied from class:CommandSends a detailed command usage message to the Sender. If this command has child commands, nothing is sent. Otherwise, a detailed messaging containing a description and argument usage is sent.- Specified by:
sendDetailedUsagein classCommand<Void>- Parameters:
sender- the sender to send the usage tolabel- the label used when executing the command
-