Annotation Interface Supports
Filters a parameter in an event
@Listener
method to only
one that supports certain data.
The parameter type must be DataHolder
or one of its subtypes.
This is a filtering annotation, meaning it needs to be used in conjunction with one of the source annotations on a parameter.
-
Required Element Summary
Modifier and TypeRequired ElementDescriptionThe name of the field incontainer()
providing this key. -
Optional Element Summary
-
Element Details
-
value
String valueThe name of the field incontainer()
providing this key.This field must be static and have a value of type
Key
- Returns:
- the name of the key field to require
-
-
-
container
Class<?> containerThe holder class to fetch keys from.- Returns:
- the key container, by default
Keys
- Default:
- org.spongepowered.api.data.Keys.class
-
inverse
boolean inverseIf true then the behavior of this filter is reversed and the data holders supporting the specified key are excluded.- Returns:
- if the parameter filter is reversed
- Default:
- false
-