Class ArgSubtype<T,K>

java.lang.Object
redempt.redlib.commandmanager.ArgType<T>
redempt.redlib.commandmanager.ArgSubtype<T,K>
Type Parameters:
T - The type this ArgType converts to
K - The type this ArgType is dependent on

public class ArgSubtype<T,K> extends ArgType<T>
An ArgType which is dependent on another type appearing before it and uses it for conversions and tab completion
  • Constructor Details

  • Method Details

    • tab

      public ArgSubtype<T,K> tab(ArgType.TabCompleter<K> tab)
      Sets the tab completer for this type
      Parameters:
      tab - The function returning a List of all completions for this sender and previous argument
      Returns:
      itself
    • tabStream

      public ArgSubtype<T,K> tabStream(ArgType.TabStreamCompleter<K> tab)
      Sets the tab completer for this type, can be used instead of tab
      Parameters:
      tab - The function returning a Stream of all completions for this sender and previous argument
      Returns:
      itself