blob: 4c9fb3cde6283611f91b7b3a5826d9e10988a24d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
package org.bukkit.event;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* An annotation to mark methods as being event handler methods
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface EventHandler {
/**
* Define the priority of the event.
* <p>
* First priority to the last priority executed:
* <ol>
* <li>LOWEST
* <li>LOW
* <li>NORMAL
* <li>HIGH
* <li>HIGHEST
* <li>MONITOR
* </ol>
*
* @return the priority
*/
EventPriority priority() default EventPriority.NORMAL;
/**
* Define if the handler ignores a cancelled event.
* <p>
* 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;
}
|