public interface SelectorHandler
SelectorHandlerManager
Modifier and Type | Method and Description |
---|---|
boolean |
isSelector(java.lang.String selectorStr)
Returns whether the string matches the overall syntax of the selector
Note: If this returns false , matchEntities(net.minecraft.command.ICommandSender, java.lang.String, java.lang.Class<? extends T>) should return an empty list |
<T extends Entity> |
matchEntities(ICommandSender sender,
java.lang.String token,
java.lang.Class<? extends T> targetClass)
Returns a
List of Entities of class targetClass (T ) represented by token Note: If token does not match the overall syntax defined by isSelector(java.lang.String) , this method should return an empty list. |
boolean |
matchesMultiplePlayers(java.lang.String selectorStr)
Returns whether the selector string potentially matches multiple entities
|
<T extends Entity> java.util.List<T> matchEntities(ICommandSender sender, java.lang.String token, java.lang.Class<? extends T> targetClass) throws CommandException
List
of Entities
of class targetClass
(T
) represented by token
token
does not match the overall syntax defined by isSelector(java.lang.String)
, this method should return an empty list.
For any other error, an exception should be thrownsender
- The ICommandSender
that initiated the queryCommandException
boolean matchesMultiplePlayers(java.lang.String selectorStr) throws CommandException
CommandException
boolean isSelector(java.lang.String selectorStr)
false
, matchEntities(net.minecraft.command.ICommandSender, java.lang.String, java.lang.Class<? extends T>)
should return an empty list