package org.terasology.entitySystem; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * This annotation is used to mark up methods that can be registered to receive events through the EventSystem * <p/> * These methods should have the form * <code>public void handlerMethod(EventType event, EntityRef entity)</code> * * @author Immortius <immortius@gmail.com> */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface ReceiveEvent { /** * What components that the entity must have for this method to be invoked */ Class<? extends Component>[] components(); int priority() default EventPriority.PRIORITY_NORMAL; }