Package cloud.commandframework.arguments
Class StandardCommandSyntaxFormatter<C>
- java.lang.Object
-
- cloud.commandframework.arguments.StandardCommandSyntaxFormatter<C>
-
- Type Parameters:
C- Command sender type
- All Implemented Interfaces:
CommandSyntaxFormatter<C>
public class StandardCommandSyntaxFormatter<C> extends java.lang.Object implements CommandSyntaxFormatter<C>
CommandSyntaxFormatterimplementation that uses the following rules:- static arguments are serialized as their name, without a bracket
- required arguments are serialized as their name, surrounded by angle brackets
- optional arguments are serialized as their name, surrounded by square brackets
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStandardCommandSyntaxFormatter.FormattingInstanceInstance that is used when building command syntax
-
Constructor Summary
Constructors Constructor Description StandardCommandSyntaxFormatter()
-
Method Summary
Modifier and Type Method Description @NonNull java.lang.Stringapply(@NonNull java.util.List<@NonNull CommandArgument<C,?>> commandArguments, @Nullable CommandTree.Node<@Nullable CommandArgument<C,?>> node)Format the command arguments into a syntax stringprotected @NonNull StandardCommandSyntaxFormatter.FormattingInstancecreateInstance()Create a new formatting instance
-
-
-
Method Detail
-
apply
public final @NonNull java.lang.String apply(@NonNull java.util.List<@NonNull CommandArgument<C,?>> commandArguments, @Nullable CommandTree.Node<@Nullable CommandArgument<C,?>> node)
Format the command arguments into a syntax string- Specified by:
applyin interfaceCommandSyntaxFormatter<C>- Parameters:
commandArguments- Command argumentsnode- Trailing node- Returns:
- Syntax string
-
createInstance
protected @NonNull StandardCommandSyntaxFormatter.FormattingInstance createInstance()
Create a new formatting instance- Returns:
- Formatting instance
-
-