aikar / aikar/commands

Support @CommandAlias on parent classes

Đang mở
#147 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
core enhancement good first issue help wanted
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

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.