Class ParentCommand<T,I>
java.lang.Object
me.lucko.luckperms.common.command.abstraction.Command<Void>
me.lucko.luckperms.common.command.abstraction.ParentCommand<T,I>
- Direct Known Subclasses:
GroupParentCommand, LogParentCommand, TrackParentCommand, UserParentCommand
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionParentCommand(CommandSpec spec, String name, ParentCommand.Type type, List<Command<T>> children) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcleanup(T t, LuckPermsPlugin plugin) voidexecute(LuckPermsPlugin plugin, Sender sender, Void ignored, ArgumentList args, String label) protected ReentrantLockgetLockForTarget(I target) protected TgetTarget(I target, LuckPermsPlugin plugin, Sender sender) getTargets(LuckPermsPlugin plugin) booleanisAuthorized(Sender sender) Returns true if the sender is authorised to use this command Commands with children are likely to override this method to check for permissions based upon whether a sender has access to any sub commands.protected IparseTarget(String target, LuckPermsPlugin plugin, Sender sender) voidsendDetailedUsage(Sender sender, String label) Sends a detailed command usage message to the Sender.voidSends a brief command usage message to the Sender.tabComplete(LuckPermsPlugin plugin, Sender sender, ArgumentList args) Methods inherited from class Command
getArgs, getArgumentCheck, getDescription, getName, getPermission, getSpec, getUsage, shouldDisplay
-
Constructor Details
-
ParentCommand
public ParentCommand(CommandSpec spec, String name, ParentCommand.Type type, List<Command<T>> children)
-
-
Method Details
-
getChildren
-
execute
public void execute(LuckPermsPlugin plugin, Sender sender, Void ignored, ArgumentList args, String label) -
tabComplete
- Overrides:
tabCompletein classCommand<Void>
-
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
-
isAuthorized
Description copied from class:CommandReturns true if the sender is authorised to use this command Commands with children are likely to override this method to check for permissions based upon whether a sender has access to any sub commands.- Overrides:
isAuthorizedin classCommand<Void>- Parameters:
sender- the sender- Returns:
- true if the sender has permission to use this command
-
getTargets
-
parseTarget
-
getLockForTarget
-
getTarget
-
cleanup
-