public class EntitySelectorEvent extends Event
ForgeEventFactory.gatherEntitySelectors(Map, String, ICommandSender, Vec3d)
,
which is executed in EntitySelector.matchEntities(ICommandSender, String, Class)
MinecraftForge.EVENT_BUS
Event.HasResult, Event.Result
Constructor and Description |
---|
EntitySelectorEvent(java.util.Map<java.lang.String,java.lang.String> map,
java.lang.String mainSelector,
ICommandSender sender,
Vec3d position) |
Modifier and Type | Method and Description |
---|---|
void |
addPredicate(com.google.common.base.Predicate<Entity> selector)
Add your custom selector.
|
java.util.Map<java.lang.String,java.lang.String> |
getArgumentMap()
Example: "@a[test=true]" would result in a map with "test"=>"true"
|
java.lang.String |
getMainSelector() |
Vec3d |
getPosition()
|
ICommandSender |
getSender() |
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
public EntitySelectorEvent(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String mainSelector, ICommandSender sender, Vec3d position)
public void addPredicate(com.google.common.base.Predicate<Entity> selector)
selector
- Your custom predicatepublic java.lang.String getMainSelector()
public java.util.Map<java.lang.String,java.lang.String> getArgumentMap()
public Vec3d getPosition()
public ICommandSender getSender()