Class FlagArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,Object>
cloud.commandframework.arguments.compound.FlagArgument<C>
- Type Parameters:
C
- Command sender type
- All Implemented Interfaces:
CloudKeyHolder<Object>
,Comparable<CommandArgument<?,
?>>
Container for flag parsing logic. This should not be be used directly.
Internally, a flag argument is a special case of a
CompoundArgument
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Reasons for which flag parsing may failstatic final class
static final class
Flag parse exceptionNested classes/interfaces inherited from class cloud.commandframework.arguments.CommandArgument
CommandArgument.Builder<C,
T>, CommandArgument.TypedBuilder<C, T, B extends CommandArgument.Builder<C, T>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Deprecated.Meta data for the last argument that was suggestedstatic final Object
Dummy object that indicates that flags were parsed successfullystatic final CloudKey<Set<CommandFlag<?>>>
Meta data for the set of parsed flags, used to detect duplicates. -
Constructor Summary
ConstructorsConstructorDescriptionFlagArgument
(Collection<CommandFlag<?>> flags) Construct a new flag argument -
Method Summary
Modifier and TypeMethodDescription@NonNull Collection<@NonNull CommandFlag<?>>
getFlags()
Get the flags registered in the 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
-
Field Details
-
FLAG_PARSE_RESULT_OBJECT
Dummy object that indicates that flags were parsed successfully -
FLAG_META
Deprecated.UseFLAG_META_KEY
insteadMeta data for the last argument that was suggested- See Also:
-
FLAG_META_KEY
Meta data for the last argument that was suggested -
PARSED_FLAGS
@API(status=EXPERIMENTAL, since="1.8.0") public static final CloudKey<Set<CommandFlag<?>>> PARSED_FLAGSMeta data for the set of parsed flags, used to detect duplicates.- Since:
- 1.8.0
-
-
Constructor Details
-
FlagArgument
Construct a new flag argument- Parameters:
flags
- Flags
-
-
Method Details
-
getFlags
Get the flags registered in the argument- Returns:
- Unmodifiable view of flags
-
FLAG_META_KEY
instead