aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/api/event/HandleEvent.kt
blob: 39b047a6e1de9a3d8e2ed08522f54721cfa417b0 (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
package at.hannibal2.skyhanni.api.event

import at.hannibal2.skyhanni.data.IslandType

@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.FUNCTION)
annotation class HandleEvent(
    /**
     * If the event should only be received while on SkyBlock.
     */
    val onlyOnSkyblock: Boolean = false,

    /**
     * If the event should only be received while on a specific skyblock island.
     */
    val onlyOnIsland: IslandType = IslandType.ANY,

    /**
     * The priority of when the event will be called, lower priority will be called first, see the companion object.
     */
    val priority: Int = 0,

    /**
     * If the event is cancelled & receiveCancelled is true, then the method will still invoke.
     */
    val receiveCancelled: Boolean = false,
) {

    companion object {
        const val HIGHEST = -2
        const val HIGH = -1
        const val LOW = 1
        const val LOWEST = 2
    }
}