Interface FlagExtractor<S extends CommandSource>
- Type Parameters:
S- the type of the command source
- All Superinterfaces:
FlagRegistrar<S>
@AvailableSince("1.9.6")
public sealed interface FlagExtractor<S extends CommandSource>
extends FlagRegistrar<S>
A class that extracts flags from a single string/argument.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <S extends CommandSource>
FlagExtractor<S>createNative(CommandPathway<S> usage) Set<FlagArgument<S>>Extracts all flags used from a single string with no spaces.voidinsertFlag(FlagArgument<S> flagArgumentData) Inserts a flag during into the trie.Methods inherited from interface studio.mevera.imperat.FlagRegistrar
getRegisteredFlags, isFlagRegistered
-
Method Details
-
createNative
-
insertFlag
Inserts a flag during into the trie. May be useful if it's necessary to insert a flag during runtime.- Parameters:
flagArgumentData- theFlagDatato insert
-
extract
Extracts all flags used from a single string with no spaces.- Parameters:
rawInput- the raw input of an argument- Returns:
- the extracted
FlagDatafor flags. - Throws:
CommandException
-