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 PlotPlayer<?> issuer, @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.Deprecated, for removal: This API element is subject to removal in a future version.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(/FastAsyncWorldEdit) patterns.completePlayers
(@NonNull PlotPlayer<?> issuer, @NonNull String input, @NonNull List<String> existing) Get a list of tab completions corresponding to player names.Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
completePlayers
@Deprecated(forRemoval=true, since="6.1.3") public static @NonNull List<Command> completePlayers(@NonNull String input, @NonNull List<String> existing) Deprecated, for removal: This API element is subject to removal in a future version.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
-
completePlayers
public static @NonNull List<Command> completePlayers(@NonNull PlotPlayer<?> issuer, @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 inputissuer
- The player who issued the tab completionexisting
- Players that should not be included in completions- Returns:
- List of completions
- Since:
- 6.1.3
-
completeAddedPlayers
@Deprecated(forRemoval=true, since="6.1.3") public static @NonNull List<Command> completeAddedPlayers(@NonNull Plot plot, @NonNull String input, @NonNull List<String> existing) Deprecated, for removal: This API element is subject to removal in a future version.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
-
completeAddedPlayers
public static @NonNull List<Command> completeAddedPlayers(@NonNull PlotPlayer<?> issuer, @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:
issuer
- The player who issued the tab completionplot
- Plot to complete added players forinput
- Command inputexisting
- Players that should not be included in completions- Returns:
- List of completions
- Since:
- 6.1.3
-
completePlayersInPlot
-
completePatterns
Get a list of completions corresponding to WorldEdit(/FastAsyncWorldEdit) 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
-
completeAddedPlayers(PlotPlayer, Plot, String, List)