Class TabCompletions

java.lang.Object
com.plotsquared.core.util.TabCompletions

public final class TabCompletions extends Object
Tab completion utilities
  • 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 input
      existing - 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 for
      input - Command input
      existing - Players that should not be included in completions
      Returns:
      List of completions
    • completePlayersInPlot

      public static @NonNull List<Command> completePlayersInPlot(@NonNull Plot plot, @NonNull String input, @NonNull List<String> existing)
    • completePatterns

      public static @NonNull List<Command> completePatterns(@NonNull String input)
      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

      public static @NonNull List<Command> completeBoolean(@NonNull String input)
    • 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 with
      amountLimit - Maximum amount of suggestions
      highestLimit - Highest number to include
      Returns:
      Unmodifiable list of number completions
    • completeAreas

      public static @NonNull List<Command> completeAreas(@NonNull String input)
      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

      public static @NonNull List<Command> asCompletions(String... toFilter)