aikar / aikar/commands

Same sub command used over 2 commands conflict in tab completion

未关闭
#126 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug core good first issue help wanted
主要语言
Java
星标
628
派生
150
PR 合并指标
30 天内没有已合并 PR

描述

given:
```java

@Subcommand("cgset|gset")
@Description("Sets residence permissions for a residence group (all players in the group get the permissions), using a chest style interface")
public void onResChestGFlagSet(Player player, @Flags("admin") Residence res, ResidenceFlagGroup group) {
InventoryUI.open(player, new GroupPermManageInterface(group, res, resadmin));
}

@Subcommand("gset")
@Description("Sets residence permissions for a residence group (all players in the group get the permissions)")
public void onResFlagGSet(Player player, @Flags("admin") Residence res, ResidenceFlagGroup group, String flag, @Values("@flagstates") String state) {
res.getPermissions().setPlayerFlag(player, group.getName(), flag, state, resadmin, false);
}
```

`/res gset ` works the same as `/res cgset `.
However when you do `/res gset build true`, ACF matches to the one with closer arguments, so it matches the second entry.

However for tab completion, it results in:
![](https://i.imgur.com/YUIFkzn.png)

and /res g completes to cgset

we need a way to improve this so gset can remain a completion.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。