dev.alangomes.springspigot.reactive.ObserveEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spigot-spring-boot-starter Show documentation
Show all versions of spigot-spring-boot-starter Show documentation
Spring support for spigot plugins
The newest version!
package dev.alangomes.springspigot.reactive;
import org.bukkit.event.EventPriority;
import org.springframework.beans.factory.annotation.Autowired;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* An annotation to inject observables to bukkit events
*/
@Autowired
@Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface ObserveEvent {
/**
* Define the priority of the event.
*
* First priority to the last priority executed:
*
* - LOWEST
*
- LOW
*
- NORMAL
*
- HIGH
*
- HIGHEST
*
- MONITOR
*
*
* @return the priority
*/
EventPriority priority() default EventPriority.NORMAL;
/**
* Define if the handler ignores a cancelled event.
*
* If ignoreCancelled is true and the event is cancelled, the method is
* not called. Otherwise, the method is always called.
*
* @return whether cancelled events should be ignored
*/
boolean ignoreCancelled() default false;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy