aikar / aikar/commands

Register a subcommand without the base command

Aperta
#324 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
core
Lingua principale
Java
Stelle
628
Fork
150
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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):
```kotlin
@CommandAlias("myplugin reload")
class MyPluginCommand : BaseCommand() {
@Default
fun onReload(sender: CommandSender) {
// Reload
}
}
```
When I execute `/help NameOfMyPlugin` I get this:
![image](https://user-images.githubusercontent.com/29484605/117162680-4606a280-adc3-11eb-87c4-0fb7326795d4.png)
I get autocomplete:
![image](https://user-images.githubusercontent.com/29484605/117162746-56b71880-adc3-11eb-8090-5b91af573c2d.png)
But the command doesn't execute:
![image](https://user-images.githubusercontent.com/29484605/117162796-633b7100-adc3-11eb-8642-5ef30f7ba65c.png)

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.