Interface Selector<T>

Type Parameters:
T - the type of object the selector expands to
All Known Implementing Classes:
AllPlayersSelector, EntitiesSelector, NearestEntitySelector, NearestPlayerSelector, OfflineSelector, OnlineSelector, RandomEntitySelector, RandomPlayerSelector, SelfSelector

public interface Selector<T>
Interface for target selectors for commands
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable List<T>
    expand(@NotNull AnnoyingSender sender)
    Expands the selector to a list of objects
    @NotNull Class<T>
    Gets the type of object the selector expands to
  • Method Details

    • getType

      @NotNull @NotNull Class<T> getType()
      Gets the type of object the selector expands to
      Returns:
      the type of object the selector expands to
    • expand

      @Nullable @Nullable List<T> expand(@NotNull @NotNull AnnoyingSender sender)
      Expands the selector to a list of objects
      Parameters:
      sender - the AnnoyingSender who executed the command
      Returns:
      the list of objects the selector expands to, or null if none