Class Selector<T>
java.lang.Object
xyz.srnyx.annoyingapi.command.selector.Selector<T>
- Type Parameters:
T- the type of object the selector expands to
- Direct Known Subclasses:
AllPlayersSelector,EntitiesSelector,NearestEntitySelector,NearestPlayerSelector,OfflineSelector,OnlineSelector,RandomEntitySelector,RandomPlayerSelector,SelfSelector
Interface for target selectors for commands
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexpand(@NotNull AnnoyingSender sender) Expands the selector to a list of objectsexpandImplementation(@NotNull AnnoyingSender sender) Gets the allowed senders for the selectorgetType()Gets the type of object the selector expands to
-
Constructor Details
-
Selector
public Selector()
-
-
Method Details
-
getType
Gets the type of object the selector expands to- Returns:
- the type of object the selector expands to
-
getAllowedSenders
@Nullable public @Nullable Set<Class<? extends org.bukkit.command.CommandSender>> getAllowedSenders()Gets the allowed senders for the selector- Returns:
- the allowed senders for the selector, or null if all senders are allowed
-
expandImplementation
@Nullable protected abstract @Nullable List<T> expandImplementation(@NotNull @NotNull AnnoyingSender sender) -
expand
Expands the selector to a list of objects- Parameters:
sender- theAnnoyingSenderwho executed the command- Returns:
- the list of objects the selector expands to, or null if invalid sender
-