✨ Add String[] args
This commit is contained in:
parent
16623969ad
commit
fcd269b6e7
7 changed files with 176 additions and 0 deletions
|
|
@ -38,6 +38,7 @@ import cloud.commandframework.arguments.standard.FloatArgument;
|
|||
import cloud.commandframework.arguments.standard.IntegerArgument;
|
||||
import cloud.commandframework.arguments.standard.ShortArgument;
|
||||
import cloud.commandframework.arguments.standard.StringArgument;
|
||||
import cloud.commandframework.arguments.standard.StringArrayArgument;
|
||||
import cloud.commandframework.context.CommandContext;
|
||||
import cloud.commandframework.permission.CommandPermission;
|
||||
import cloud.commandframework.permission.Permission;
|
||||
|
|
@ -185,6 +186,9 @@ public final class CloudBrigadierManager<C, S> {
|
|||
/* Map flags to a greedy string */
|
||||
this.registerMapping(new TypeToken<FlagArgument.FlagArgumentParser<C>>() {
|
||||
}, false, argument -> StringArgumentType.greedyString());
|
||||
/* Map String[] to a greedy string */
|
||||
this.registerMapping(new TypeToken<StringArrayArgument.StringArrayParser<C>>() {
|
||||
}, false, argument -> StringArgumentType.greedyString());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue