Class SubcommandNodeArgument<T extends me.lucyy.squirtgun.platform.audience.PermissionHolder>

    • Constructor Detail

      • SubcommandNodeArgument

        public SubcommandNodeArgument​(SubcommandNode<T> parent,
                                      java.lang.String name,
                                      java.lang.String description)
        Parameters:
        parent - the node this argument belongs to
        name - the argument's name
        description - the argument's description
    • Method Detail

      • getValue

        public CommandNode<T> getValue​(java.util.Queue<java.lang.String> args,
                                       CommandContext<?> context)
        Description copied from interface: CommandArgument
        Reads from a queue to get the value for this argument.
        Parameters:
        args - a queue of strings containing the raw arguments. Pop as many as needed and no more.
        context - the context that this command has been executed in. Be aware that arguments may not yet be populated.
        Returns:
        the parsed string value of this argument.
      • tabComplete

        @Nullable
        public @Nullable java.util.List<java.lang.String> tabComplete​(java.util.Queue<java.lang.String> args,
                                                                      CommandContext<?> context)
        Description copied from interface: CommandArgument
        Tab-completes this node.
        Parameters:
        args - a queue of strings containing the raw arguments. Pop as many as needed and no more.
        context - the context that this command has been executed in. Be aware that arguments may not yet be populated.
        Returns:
        the tabcompleted value of this node, or if not applicable, null
      • isOptional

        public boolean isOptional()
        Description copied from interface: CommandArgument
        Gets whether this argument is optional or not. This should not change how the argument behaves.
        Specified by:
        isOptional in interface CommandArgument<T extends me.lucyy.squirtgun.platform.audience.PermissionHolder>
        Overrides:
        isOptional in class AbstractArgument<CommandNode<T extends me.lucyy.squirtgun.platform.audience.PermissionHolder>>