aikar/commands

[Question] Argument names in-game

iamkoldun opened this issue · 4 comments

Hey there! I want players to be able to see the argument names above the command line, as they do with <name> in the attached screenshot. In this case, the arguments do not need autocompletion. How can I implement this?
javaw_gkbsZjVX6H

manager.enableUnstableApi("brigadier");
manager.enableUnstableApi("brigadier");

After several attempts, I could not achieve the desired effect. When you press the spacebar, an empty label appears, and when typing, the same text appears on top.

изображение

изображение

Here is my code:

Main class:

public void onEnable() {

        ...
        
        BungeeCommandManager manager = new BungeeCommandManager(this);
        manager.registerCommand(new MyCommand());

        manager.enableUnstableAPI("brigadier");
    }

MyCommand class:

@CommandAlias("somecommand")
@SuppressWarnings("unused")
public class MyCommand extends BaseCommand {
    @Default
    @Syntax("<sometext>")
    public void execute(ProxiedPlayer player, String text) {
        ...
    }
}

Maybe I should add something in the argument declaration..?

The brigadier implementation is currently only awailable for Paper.
It's not possible in BungeeCord.

Got it, thanks for the help!