Class PlayerArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,org.bukkit.entity.Player>
cloud.commandframework.bukkit.parsers.PlayerArgument<C>
- Type Parameters:
C- Command sender type
- All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<org.bukkit.entity.Player>,Comparable<cloud.commandframework.arguments.CommandArgument<?,?>>
public final class PlayerArgument<C>
extends cloud.commandframework.arguments.CommandArgument<C,org.bukkit.entity.Player>
Argument that parses into a
Player-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classPlayer parse exceptionstatic final class -
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull PlayerArgument.Builder<C>newBuilder(@NonNull String name) Create a new builderstatic <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.bukkit.entity.Player> Create a new required command componentstatic <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.bukkit.entity.Player> Create a new optional command componentstatic <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.bukkit.entity.Player> Create a new required command component with a default valueMethods 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
-
newBuilder
Create a new builder- Type Parameters:
C- Command sender type- Parameters:
name- Name of the component- Returns:
- Created builder
-
of
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.bukkit.entity.Player> of(@NonNull String name) Create a new required command component- Type Parameters:
C- Command sender type- Parameters:
name- Component name- Returns:
- Created component
-
optional
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.bukkit.entity.Player> optional(@NonNull String name) Create a new optional command component- Type Parameters:
C- Command sender type- Parameters:
name- Component name- Returns:
- Created component
-
optional
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.bukkit.entity.Player> optional(@NonNull String name, @NonNull String defaultPlayer) Create a new required command component with a default value- Type Parameters:
C- Command sender type- Parameters:
name- Component namedefaultPlayer- Default player- Returns:
- Created component
-