Skip to content

Async Annotation

Marcin Grzywacz edited this page Sep 7, 2021 · 1 revision

DONT USE IT IF YOU DONT KNOW WHAT YOU'RE DOING

This annotation makes your whole class or method run asynchronous (if you do cmd pass it will still be async) it will use Bukkit Scheduler to run taks async
Example:

@Async
class MiscCMD {
    fun killx(executor: Player, toBeKilled: Player): String {
        return "lol JK"
    }
    fun godmode(executor: Player): String {
        return "<yellow> You have been granted godmode"
    }
}
Clone this wiki locally