Fixed hopefully every bug concerning "enter to send" ability #36
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE xml>
|
||||
<projectDescription>
|
||||
<name>client</name>
|
||||
<comment></comment>
|
||||
|
@ -1,9 +1,8 @@
|
||||
package envoy.client.data.commands;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.*;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -198,13 +197,13 @@ public final class SystemCommandsMap {
|
||||
* are present
|
||||
* @since Envoy Client v0.2-beta
|
||||
*/
|
||||
public void requestRecommendations(String input, Function<Set<String>, Void> action) {
|
||||
public void requestRecommendations(String input, Consumer<Set<String>> action) {
|
||||
final var partialCommand = getCommand(input);
|
||||
// Get the expected commands
|
||||
final var recommendations = recommendCommands(partialCommand);
|
||||
if (recommendations.isEmpty()) return;
|
||||
// Execute the given action
|
||||
else action.apply(recommendations);
|
||||
else action.accept(recommendations);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user