mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-05 07:16:10 +00:00
remove event annotations
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
package com.dfsek.terra.api.event.annotations;
|
||||
|
||||
import com.dfsek.terra.api.event.events.PackEvent;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Specifies that an event handler is to handle all {@link PackEvent}s, regardless of whether the pack
|
||||
* depends on the com.dfsek.terra.addon's listener.
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface Global {
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package com.dfsek.terra.api.event.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Annotated listener methods will have a specific priority set.
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface Priority {
|
||||
/**
|
||||
* Highest possible priority. Listeners with this priority will always be invoked last.
|
||||
*/
|
||||
int HIGHEST = Integer.MAX_VALUE;
|
||||
/**
|
||||
* Lowest possible priority. Listeners with this priority will always be invoked first.
|
||||
*/
|
||||
int LOWEST = Integer.MIN_VALUE;
|
||||
/**
|
||||
* Default priority.
|
||||
*/
|
||||
int NORMAL = 0;
|
||||
/**
|
||||
* High priority.
|
||||
*/
|
||||
int HIGH = 1;
|
||||
/**
|
||||
* Low Priority.
|
||||
*/
|
||||
int LOW = -1;
|
||||
|
||||
/**
|
||||
* @return Priority of this event. Events are executed from lowest to highest priorities.
|
||||
*/
|
||||
int value();
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
package com.dfsek.terra.api.event.events;
|
||||
|
||||
import com.dfsek.terra.api.config.ConfigPack;
|
||||
import com.dfsek.terra.api.event.annotations.Global;
|
||||
|
||||
/**
|
||||
* An event with functionality directly linked to a {@link ConfigPack}.
|
||||
* <p>
|
||||
* PackEvents are only invoked when the pack specifies the com.dfsek.terra.addon in its
|
||||
* {@code com.dfsek.terra.addon} key (or when the listener is annotated {@link Global}).
|
||||
* PackEvents are only invoked when the pack specifies the addon in its
|
||||
* {@code addon} key (or when the listener is global).
|
||||
*/
|
||||
@SuppressWarnings("InterfaceMayBeAnnotatedFunctional")
|
||||
public interface PackEvent extends Event {
|
||||
|
||||
Reference in New Issue
Block a user