Skip to content

Default Annotation

Marcin Grzywacz edited this page Aug 14, 2022 · 2 revisions

Default annotation

Default annotation says that this certain function is considered as a default method that means with the following code below:

import org.bukkit.command.CommandSender
import org.lupus.commands.core.annotations.method.Default

class TestCMD {
    @Default
    fun run(ex: CommandSender, value: Int): String {
        return "Yay your number was $value"
    }
}

Player doesn't have to type /test run 1 simple /test 1 will execute the command

Results:
Animation

Clone this wiki locally