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
Modifier and TypeClassDescriptionstatic class
Reasons for which flag parsing may failstatic class
static 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
-
Constructor Summary
ConstructorDescriptionFlagArgument(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:
- Constant Field Values
-
FLAG_META_KEY
Meta data for the last argument that was suggested
-
-
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