Subcommand Completion
See original GitHub issueMaybe I’m too stupid, but I don’t get my command to tab-complete my subcommand names.
For example I have the following command:
@CommandAlias("test")
public class TestCommand extends BaseCommand {
@Subcommand("bla")
public final void onBla(CommandSender sender) {
sender.sendMessage(ChatColor.AQUA + "Bla");
}
@Subcommand("lol")
public void onLOL(CommandSender sender) {
sender.sendMessage(ChatColor.GREEN + "LOL");
}
}
Plugin:
public final class TestPlugin extends JavaPlugin {
private PaperCommandManager commandManager;
@Override
public void onEnable() {
this.registerCommands();
}
private void registerCommands() {
this.commandManager = new PaperCommandManager(this);
this.commandManager.registerCommand(new TestCommand());
}
}
How can I setup completion, so that, when I type /test
in minecraft, there appear the two completions bla
and lol
?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How do I autocomplete nested, multi-level subcommands?
I am trying to develop an autocomplete or tab-complete feature for my own set of commands. For example, assume foo is my binary:...
Read more >writing bash completion script with subcommands
Following along from my last post, I'm going to detail how to write bash completion scripts for deeply nested subcommands.
Read more >Writing zsh completions for CLIs with subcommands - DoltHub
Here's the key to getting subcommands working in a zsh completion script without tearing your hair out: the top-level completion function and ...
Read more >Make completions for subcommands easier to add · Issue #7107
The current way to add completions for subcommands of a command, as can be seen from the default completions in share/completions, ...
Read more >Completion Tool - 4.x - CakePHP Cookbook
The Completion Shell consists of a number of sub commands to assist the developer creating its completion script. ... bin/cake Completion subcommands bake....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this is a known issue im going to be debugging tonight. it actually works on console, just not in game… I gotta figure out what the difference is (I’m actually suspecting bungee might be related)
@js6pak please update to Paper 515+ to fix that bug.