Package com.plotsquared.core.util
Class TabCompletions
java.lang.Object
com.plotsquared.core.util.TabCompletions
Tab completion utilities
-
Method Summary
Modifier and TypeMethodDescriptionasCompletions(String... toFilter)
completeAddedPlayers(@NonNull Plot plot, @NonNull String input, @NonNull List<String> existing)
Get a list of tab completions corresponding to player names added to the given plot.completeAreas(@NonNull String input)
Get a list of plot areas matching the given input.completeBoolean(@NonNull String input)
completeNumbers(@NonNull String input, int amountLimit, int highestLimit)
Get a list of integer numbers matching the given input.completePatterns(@NonNull String input)
Get a list of completions corresponding to WorldEdit(/FAWE) patterns.completePlayers(@NonNull String input, @NonNull List<String> existing)
Get a list of tab completions corresponding to player names.completePlayersInPlot(@NonNull Plot plot, @NonNull String input, @NonNull List<String> existing)
-
Method Details
-
completePlayers
public static @NonNull List<Command> completePlayers(@NonNull String input, @NonNull List<String> existing)Get a list of tab completions corresponding to player names. This uses the UUID pipeline cache, so it will complete will all names known to PlotSquared- Parameters:
input
- Command inputexisting
- Players that should not be included in completions- Returns:
- List of completions
-
completeAddedPlayers
public static @NonNull List<Command> completeAddedPlayers(@NonNull Plot plot, @NonNull String input, @NonNull List<String> existing)Get a list of tab completions corresponding to player names added to the given plot.- Parameters:
plot
- Plot to complete added players forinput
- Command inputexisting
- Players that should not be included in completions- Returns:
- List of completions
-
completePlayersInPlot
-
completePatterns
Get a list of completions corresponding to WorldEdit(/FAWE) patterns. This uses WorldEdit's pattern completer internally.- Parameters:
input
- Command input- Returns:
- List of completions
-
completeBoolean
-
completeNumbers
public static @NonNull List<Command> completeNumbers(@NonNull String input, int amountLimit, int highestLimit)Get a list of integer numbers matching the given input. If the input string is empty, nothing will be returned. The list is unmodifiable.- Parameters:
input
- Input to filter withamountLimit
- Maximum amount of suggestionshighestLimit
- Highest number to include- Returns:
- Unmodifiable list of number completions
-
completeAreas
Get a list of plot areas matching the given input. The list is unmodifiable.- Parameters:
input
- Input to filter with- Returns:
- Unmodifiable list of area completions
-
asCompletions
-