Annotation Type Supports
-
@Target(PARAMETER) @Retention(RUNTIME) public @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
Required Elements Modifier and Type Required Element Description java.lang.String
value
The name of the field incontainer()
providing this key.
-
-
-
Element Detail
-
value
java.lang.String value
The 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
java.lang.Class<?> container
The holder class to fetch keys from.- Returns:
- the key container, by default
Keys
- Default:
- org.spongepowered.api.data.Keys.class
-
-