Class UserArgument<C>

java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,org.pircbotx.User>
cloud.commandframework.pircbotx.arguments.UserArgument<C>
Type Parameters:
C - Command sender type
All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<org.pircbotx.User>, Comparable<cloud.commandframework.arguments.CommandArgument<?,?>>

public final class UserArgument<C> extends cloud.commandframework.arguments.CommandArgument<C,org.pircbotx.User>
Command argument that parses PircBotX users
Since:
1.1.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
     
    static final class 
     
    static final class 
     

    Nested classes/interfaces inherited from class cloud.commandframework.arguments.CommandArgument

    cloud.commandframework.arguments.CommandArgument.TypedBuilder<C extends Object,T extends Object,B extends cloud.commandframework.arguments.CommandArgument.Builder<C,T>>
  • Method Summary

    Modifier and Type
    Method
    Description
    static <C> @NonNull UserArgument.Builder<C>
    newBuilder(@NonNull String name)
    Create a new user argument builder
    static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.pircbotx.User>
    of(@NonNull String name)
    Create a new required user argument
    static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.pircbotx.User>
    optional(@NonNull String name)
    Create a optional user argument

    Methods inherited from class cloud.commandframework.arguments.CommandArgument

    addPreprocessor, compareTo, copy, equals, getDefaultDescription, getDefaultValue, getKey, getName, getOwningCommand, getParser, getSuggestionsProvider, getValueType, hasDefaultValue, hashCode, isArgumentRegistered, isRequired, ofType, ofType, preprocess, setArgumentRegistered, setOwningCommand, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • newBuilder

      public static <C> @NonNull UserArgument.Builder<C> newBuilder(@NonNull String name)
      Create a new user argument builder
      Type Parameters:
      C - Command sender type
      Parameters:
      name - Argument name
      Returns:
      Builder instance
    • of

      public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.pircbotx.User> of(@NonNull String name)
      Create a new required user argument
      Type Parameters:
      C - Command sender type
      Parameters:
      name - Argument name
      Returns:
      Argument instance
    • optional

      public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.pircbotx.User> optional(@NonNull String name)
      Create a optional user argument
      Type Parameters:
      C - Command sender type
      Parameters:
      name - Argument name
      Returns:
      Argument instance