Skip to content

Desc Annotation

Marcin Grzywacz edited this page Sep 25, 2022 · 3 revisions

It's basically a description for the Command that will help to describe to players what command is doing it will be implemented to see in the commands /help <custom-command> and with /<custom-command> help as you can see in the HelpCMD annotation section it also accepts I18n .properties replacements for example if you set and have line in your .properties something-cool=Something very cool! it will output to player 'Something very cool!' every time player wants to learn about the command but you need to have i18n tag in desc like this @Desc("<something-cool>")
Example class:

@Desc("Misc command to do examples")
@HelpCMD
class MiscCMD {
    @Desc("Epicly! kills the enemy")
    fun killx(executor: Player, toBeKilled: Player): String {
        return "lol JK"
    }
    fun godmode(executor: Player): String {
        return "<yellow> You have been granted godmode"
    }
}

Will produce result: /misc help

Clone this wiki locally