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<?,?>>

@API(status=STABLE) public final class FlagArgument<C> extends CommandArgument<C,Object>
Container for flag parsing logic. This should not be be used directly. Internally, a flag argument is a special case of a CompoundArgument.
  • Field Details

    • FLAG_PARSE_RESULT_OBJECT

      public static final Object FLAG_PARSE_RESULT_OBJECT
      Dummy object that indicates that flags were parsed successfully
    • FLAG_META

      @Deprecated public static final String FLAG_META
      Deprecated.
      Use FLAG_META_KEY instead
      Meta data for the last argument that was suggested
      See Also:
    • FLAG_META_KEY

      public static final CloudKey<String> 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_FLAGS
      Meta data for the set of parsed flags, used to detect duplicates.
      Since:
      1.8.0
  • Constructor Details

    • FlagArgument

      public FlagArgument(Collection<CommandFlag<?>> flags)
      Construct a new flag argument
      Parameters:
      flags - Flags
  • Method Details

    • getFlags

      public @NonNull Collection<@NonNull CommandFlag<?>> getFlags()
      Get the flags registered in the argument
      Returns:
      Unmodifiable view of flags