Class GenericParentCommand<T extends PermissionHolder>
java.lang.Object
me.lucko.luckperms.common.command.abstraction.Command<T>
me.lucko.luckperms.common.command.abstraction.ChildCommand<T>
me.lucko.luckperms.common.command.abstraction.GenericParentCommand<T>
- Type Parameters:
T-
- Direct Known Subclasses:
CommandMeta,CommandParent,CommandPermission
A shared main command. Shared meaning it can apply to both users and groups.
This extends sub command as they're actually sub commands of the main user/group commands.
-
Constructor Summary
ConstructorsConstructorDescriptionGenericParentCommand(CommandSpec spec, String name, HolderType type, List<GenericChildCommand> children) -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(LuckPermsPlugin plugin, Sender sender, T holder, ArgumentList args, String label) 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.tabComplete(LuckPermsPlugin plugin, Sender sender, ArgumentList args) Methods inherited from class me.lucko.luckperms.common.command.abstraction.ChildCommand
sendDetailedUsage, sendUsageMethods inherited from class me.lucko.luckperms.common.command.abstraction.Command
getArgs, getArgumentCheck, getDescription, getName, getPermission, getSpec, getUsage, shouldDisplay
-
Constructor Details
-
GenericParentCommand
public GenericParentCommand(CommandSpec spec, String name, HolderType type, List<GenericChildCommand> children)
-
-
Method Details
-
execute
public void execute(LuckPermsPlugin plugin, Sender sender, T holder, ArgumentList args, String label) - Specified by:
executein classCommand<T extends PermissionHolder>
-
tabComplete
- Overrides:
tabCompletein classCommand<T extends PermissionHolder>
-
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<T extends PermissionHolder>- Parameters:
sender- the sender- Returns:
- true if the sender has permission to use this command
-