Class FlagArgument<C>

  • Type Parameters:
    C - Command sender type
    All Implemented Interfaces:
    CloudKeyHolder<java.lang.Object>, java.lang.Comparable<CommandArgument<?,​?>>

    public final class FlagArgument<C>
    extends CommandArgument<C,​java.lang.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 Detail

      • FLAG_PARSE_RESULT_OBJECT

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

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

        public static final CloudKey<java.lang.String> FLAG_META_KEY
        Meta data for the last argument that was suggested
    • Constructor Detail

      • FlagArgument

        public FlagArgument​(java.util.Collection<CommandFlag<?>> flags)
        Construct a new flag argument
        Parameters:
        flags - Flags
    • Method Detail

      • getFlags

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