Annotation Interface ContextValue
Sets the parameter to the object with the specified name. An additional check
is done to ensure that the named cause object is of the correct type. The
filter fails if this is not the case.
- See Also:
-
Required Element Summary
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
If true then the behavior of the typeFilter is reversed and the specified types are excluded rather than included.Class<?>[]
If specified the possible type for the returned object (normally specified by the type of the annotated parameter) is restricted to only the specified types.
-
Element Details
-
value
String valueGets the name to use with theEventContextKey
.This must be a field in
EventContextKeys
.- Returns:
- The name to use
-
typeFilter
Class<?>[] typeFilterIf specified the possible type for the returned object (normally specified by the type of the annotated parameter) is restricted to only the specified types.For exampled annotating a parameter of type Monster would normally accept all entities extending Monster, however with the includes specified as Enderman and Zombie the possible Monsters returned would be restricted to entities extending either Enderman and Zombie.
- Returns:
- The included classes, if empty then the type is not restricted
- Default:
{}
-
inverse
boolean inverseIf true then the behavior of the typeFilter is reversed and the specified types are excluded rather than included.- Returns:
- If the type filter is reversed
- Default:
false
-