mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 20:56:41 +00:00
Fix tab complete error for single property states
This commit is contained in:
@ -11,6 +11,7 @@ import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
@ -52,6 +53,14 @@ public class SuggestInputParseException extends InputParseException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static SuggestInputParseException of(String input, List<Object> values) {
|
||||
throw new SuggestInputParseException("No value: " + input, input, () ->
|
||||
values.stream()
|
||||
.map(v -> v.toString())
|
||||
.filter(v -> v.startsWith(input))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized Throwable getCause() {
|
||||
return cause.getCause();
|
||||
|
Reference in New Issue
Block a user