Added TabComplete reducer for better suggestions
This commit is contained in:
parent
09e0db05d9
commit
b28a618431
@ -50,6 +50,10 @@ public abstract class ApplianceCommand<T extends Appliance> implements Appliance
|
||||
return null;
|
||||
}
|
||||
|
||||
protected List<String> tabCompleteReducer(List<String> response, String[] args) {
|
||||
return response.stream().filter(s -> s.startsWith(args[args.length-1])).toList();
|
||||
}
|
||||
|
||||
protected abstract void execute(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args);
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user