Class SelectorManager

java.lang.Object
xyz.srnyx.annoyingapi.command.selector.SelectorManager

public class SelectorManager extends Object
  • Field Details

  • Constructor Details

    • SelectorManager

      public SelectorManager(@NotNull @NotNull AnnoyingPlugin plugin)
  • Method Details

    • registerSelectors

      public void registerSelectors()
    • getKeys

      @NotNull public @NotNull List<String> getKeys()
      Gets a list of all registered selector keys
      Returns:
      a list of all registered selector keys
    • getKeys

      @NotNull public @NotNull List<String> getKeys(@NotNull @NotNull Class<?> type)
      Gets a list of all registered selector keys for a specific type
      Parameters:
      type - the type to filter by
      Returns:
      a list of all registered selector keys for the specified type
    • withKeys

      @NotNull public @NotNull Collection<String> withKeys(@NotNull @NotNull Collection<String> collection)
      Adds all registered selector keys to the beginning of a collection
      This returns a NEW List, it does not modify the input collection!
      Parameters:
      collection - the collection to add to
      Returns:
      the collection with all registered selector keys added
      See Also:
    • withKeys

      @NotNull public @NotNull List<String> withKeys(@NotNull @NotNull Collection<String> collection, @NotNull @NotNull Class<?> type)
      Adds all registered selector keys for a specific type to the beginning of a collection
      This returns a NEW List, it does not modify the input collection!
      Parameters:
      collection - the collection to add to
      type - the type to filter by
      Returns:
      the collection with all registered selector keys for the specified type added
      See Also:
    • addKeysTo

      @NotNull public @NotNull Collection<String> addKeysTo(@NotNull @NotNull Collection<String> collection)
      Adds all registered selector keys to a collection
      This modifies the input collection!
      Parameters:
      collection - the collection to add to
      Returns:
      the collection with all registered selector keys added (for convenience)
      See Also:
    • addKeysTo

      @NotNull public @NotNull Collection<String> addKeysTo(@NotNull @NotNull Collection<String> collection, @NotNull @NotNull Class<?> type)
      Adds all registered selector keys for a specific type to a collection
      This modifies the input collection!
      Parameters:
      collection - the collection to add to
      type - the type to filter by
      Returns:
      the collection with all registered selector keys added (for convenience)
      See Also: