Class PlayerArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,com.velocitypowered.api.proxy.Player>
cloud.commandframework.velocity.arguments.PlayerArgument<C>
- Type Parameters:
C- Command sender type
- All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<com.velocitypowered.api.proxy.Player>,Comparable<cloud.commandframework.arguments.CommandArgument<?,?>>
public final class PlayerArgument<C>
extends cloud.commandframework.arguments.CommandArgument<C,com.velocitypowered.api.proxy.Player>
Argument parser for
players- Since:
- 1.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final class -
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull PlayerArgument.Builder<C>Create a newPlayerArgument.Builder.static <C> @NonNull PlayerArgument.Builder<C>newBuilder(@NonNull String name) Deprecated.static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,com.velocitypowered.api.proxy.Player> Create a new required player argumentstatic <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,com.velocitypowered.api.proxy.Player> Create a new optional player argumentMethods 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
-
Method Details
-
builder
@API(status=STABLE, since="1.8.0") public static <C> @NonNull PlayerArgument.Builder<C> builder(@NonNull String name) Create a newPlayerArgument.Builder.- Type Parameters:
C- sender type- Parameters:
name- argument name- Returns:
- new
PlayerArgument.Builder - Since:
- 1.8.0
-
newBuilder
@API(status=DEPRECATED, since="1.8.0") @Deprecated public static <C> @NonNull PlayerArgument.Builder<C> newBuilder(@NonNull String name) Deprecated.preferbuilder(String)Create a new builder- Type Parameters:
C- Command sender type- Parameters:
name- Name of the argument- Returns:
- Created builder
-
of
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,com.velocitypowered.api.proxy.Player> 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> @NonNull cloud.commandframework.arguments.CommandArgument<C,com.velocitypowered.api.proxy.Player> optional(@NonNull String name) Create a new optional player argument- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Created argument
-
builder(String)