Support @CommandAlias on parent classes
- Ngôn ngữ chính
- Java
- Star
- 628
- Fork
- 150
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
This should define:
```
/feature help
/feature foo hello
/feature foo world
```
with the following
```java
@CommandAlias("feature")
public class FeatureCommand extends BaseCommand {
@HelpCommand
public void onHelp(CommandHelp help) { help.showHelp(); }
}
@Subcommand("foo")
public class FeatureGroup1 extends FeatureCommand {
@Subcommand("hello")
public void onHello() { }
}
@Subcommand("bar")
public class FeatureGroup2 extends FeatureCommand {
@Subcommand("world")
public void onWorld() { }
}
```
We need to check inheritance of the class to find @CommandAlias.
This avoids duplicating it over multiple multiple classes, forcing you to use replacements to make it managed in 1 place (which is decoupled)
If we encounter multiple command aliases above the BaseCommand, they should be merged.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.