Improve FilteringCommandSuggestionProcessor and adjust default filters (#410)
This commit is contained in:
parent
6c026f994b
commit
eca81f7372
10 changed files with 278 additions and 8 deletions
|
|
@ -29,6 +29,7 @@ import cloud.commandframework.bungee.arguments.PlayerArgument;
|
|||
import cloud.commandframework.bungee.arguments.ServerArgument;
|
||||
import cloud.commandframework.captions.FactoryDelegatingCaptionRegistry;
|
||||
import cloud.commandframework.execution.CommandExecutionCoordinator;
|
||||
import cloud.commandframework.execution.FilteringCommandSuggestionProcessor;
|
||||
import cloud.commandframework.meta.SimpleCommandMeta;
|
||||
import io.leangen.geantyref.TypeToken;
|
||||
import java.util.function.Function;
|
||||
|
|
@ -76,6 +77,10 @@ public class BungeeCommandManager<C> extends CommandManager<C> {
|
|||
this.commandSenderMapper = commandSenderMapper;
|
||||
this.backwardsCommandSenderMapper = backwardsCommandSenderMapper;
|
||||
|
||||
this.commandSuggestionProcessor(new FilteringCommandSuggestionProcessor<>(
|
||||
FilteringCommandSuggestionProcessor.Filter.<C>startsWith(true).andTrimBeforeLastSpace()
|
||||
));
|
||||
|
||||
/* Register Bungee Preprocessor */
|
||||
this.registerCommandPreProcessor(new BungeeCommandPreprocessor<>(this));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue