Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register a subcommand without the base command #324

Open
dominik-korsa opened this issue May 5, 2021 · 1 comment
Open

Register a subcommand without the base command #324

dominik-korsa opened this issue May 5, 2021 · 1 comment
Labels
core Related to the ACF Core

Comments

@dominik-korsa
Copy link

Hi, I would like to register a command like this: myplugin reload. How can I do that, so it shows in help?
I've tried doing it like this (code is written in Kotlin):

@CommandAlias("myplugin reload")
class MyPluginCommand : BaseCommand() {
    @Default
    fun onReload(sender: CommandSender) {
        // Reload
    }
}

When I execute /help NameOfMyPlugin I get this:
image
I get autocomplete:
image
But the command doesn't execute:
image

@sqlongithub
Copy link

Try

@CommandAlias("myplugin")
class MyPluginCommand : BaseCommand() {
    @Default
    @Subcommand("reload")
    fun onReload(sender: CommandSender) {
        // Reload
    }
}

@chickeneer chickeneer added the core Related to the ACF Core label Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to the ACF Core
Projects
None yet
Development

No branches or pull requests

3 participants