Back to src/main/java/com/scriptslab/api/event
J
EventSubscription.java
Java · 42 lines · 791 B
src/main/java/com/scriptslab/api/event/EventSubscription.java
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
42
package com.scriptslab.api.event;
/**
* Represents a subscription to an event.
* Can be cancelled to stop receiving events.
*/
public interface EventSubscription {
/**
* Gets the event type this subscription is for.
*
* @return event class
*/
Class<? extends PluginEvent> getEventType();
/**
* Gets the priority of this subscription.
*
* @return priority
*/
EventBus.EventPriority getPriority();
/**
* Checks if this subscription is active.
*
* @return true if active
*/
boolean isActive();
/**
* Cancels this subscription.
*/
void cancel();
/**
* Gets the subscriber object.
*
* @return subscriber
*/
Object getSubscriber();
}