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

public abstract class ParentCommand<T,I> extends Command<Void>
  • Constructor Details

  • Method Details

    • getChildren

      public @NonNull List<Command<T>> getChildren()
    • execute

      public void execute(LuckPermsPlugin plugin, Sender sender, Void ignored, ArgumentList args, String label)
      Specified by:
      execute in class Command<Void>
    • tabComplete

      public List<String> tabComplete(LuckPermsPlugin plugin, Sender sender, ArgumentList args)
      Overrides:
      tabComplete in class Command<Void>
    • sendUsage

      public void sendUsage(Sender sender, String label)
      Description copied from class: Command
      Sends 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.
      Specified by:
      sendUsage in class Command<Void>
      Parameters:
      sender - the sender to send the usage to
      label - the label used when executing the command
    • sendDetailedUsage

      public void sendDetailedUsage(Sender sender, String label)
      Description copied from class: Command
      Sends 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:
      sendDetailedUsage in class Command<Void>
      Parameters:
      sender - the sender to send the usage to
      label - the label used when executing the command
    • isAuthorized

      public boolean isAuthorized(Sender sender)
      Description copied from class: Command
      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.
      Overrides:
      isAuthorized in class Command<Void>
      Parameters:
      sender - the sender
      Returns:
      true if the sender has permission to use this command
    • getTargets

      protected abstract List<String> getTargets(LuckPermsPlugin plugin)
    • parseTarget

      protected abstract I parseTarget(String target, LuckPermsPlugin plugin, Sender sender)
    • getLockForTarget

      protected abstract ReentrantLock getLockForTarget(I target)
    • getTarget

      protected abstract T getTarget(I target, LuckPermsPlugin plugin, Sender sender)
    • cleanup

      protected abstract void cleanup(T t, LuckPermsPlugin plugin)