@Retention(value=RUNTIME)
@Target(value={FIELD,METHOD})
public @interface CapabilityInject
@CapabilityInject(IExampleCapability.class) private static final CapabilityWhen placed on a METHOD, the method will be invoked once the capability is registered. This allows you to have a 'enable features' callback. It MUST have one parameter of type 'Capability; Example:TEST_CAP = null;
@CapabilityInject(IExampleCapability.class) private static void capRegistered(CapabilityWarning: Capability injections are run in the thread that the capablity is registered. Due to parallel mod loading, this can potentially be off of the main thread.cap) {}
Modifier and Type | Required Element and Description |
---|---|
java.lang.Class<?> |
value
The capability interface to listen for registration.
|