Annotation Interface GetValue
A parameter source annotation that gets a value for a certain data key.
This value can be taken from the event cause's first ValueContainer
,
or any preceding parameter that inherits from ValueContainer
.
When looking for a value, searching will start from the parameter
immediately before the annotated one, moving backwards and checking the first
ValueContainer
in the event cause last.
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionThe name of the field incontainer()
providing this key. -
Optional Element Summary
Optional Elements
-
Element Details
-
container
Class<?> containerThe holder class to fetch keys from.- Returns:
- the key container, by default
Keys
- Default:
org.spongepowered.api.data.Keys.class
-
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
-