Class PlayerArgument<C>

java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,net.md_5.bungee.api.connection.ProxiedPlayer>
cloud.commandframework.bungee.arguments.PlayerArgument<C>
Type Parameters:
C - Command sender type
All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<net.md_5.bungee.api.connection.ProxiedPlayer>, Comparable<cloud.commandframework.arguments.CommandArgument<?,?>>

public final class PlayerArgument<C> extends cloud.commandframework.arguments.CommandArgument<C,net.md_5.bungee.api.connection.ProxiedPlayer>
Argument parser for players
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 cloud.commandframework.arguments.CommandArgument.Builder<C,net.md_5.bungee.api.connection.ProxiedPlayer>
    newBuilder(@NonNull String name)
    Create a new argument builder
    static <C> cloud.commandframework.arguments.CommandArgument<C,net.md_5.bungee.api.connection.ProxiedPlayer>
    of(@NonNull String name)
    Create a new required player argument
    static <C> cloud.commandframework.arguments.CommandArgument<C,net.md_5.bungee.api.connection.ProxiedPlayer>
    optional(@NonNull String name)
    Create a new optional player 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 cloud.commandframework.arguments.CommandArgument.Builder<C,net.md_5.bungee.api.connection.ProxiedPlayer> newBuilder(@NonNull String name)
      Create a new argument builder
      Type Parameters:
      C - Command sender type
      Parameters:
      name - Argument name
      Returns:
      Constructed builder
    • of

      public static <C> cloud.commandframework.arguments.CommandArgument<C,net.md_5.bungee.api.connection.ProxiedPlayer> of(@NonNull String name)
      Create a new required player argument
      Type Parameters:
      C - Command sender type
      Parameters:
      name - Argument name
      Returns:
      Created argument
    • optional

      public static <C> cloud.commandframework.arguments.CommandArgument<C,net.md_5.bungee.api.connection.ProxiedPlayer> optional(@NonNull String name)
      Create a new optional player argument
      Type Parameters:
      C - Command sender type
      Parameters:
      name - Argument name
      Returns:
      Created argument