This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
So i want $arg1 to be a playername (tab-completed), and $arg2 to be one of the things listed in the "tab_completer:" listBut i actually have no idea of how to do this... Any help?
I could never get tab_complete to work for anything other than player names... I too would like to know if this is a bug or if I've just never been able to figure out the right way...
Currently you can't do both. If you pur "register: true" and stop, the command will return with the list of player names. If you use
tab_completer: <br /> - option 1 - option 2
the plugin will return with that list. There are possibilities to expand that in future, but for now, it's limited in this way.
okay so: tab_completer WITH register: true = player namestab_completer WITHOUT register: true = provided list
?
Just tested it and
test: command: /test type: RUN_COMMAND runcmd: - '$text$hello $multiargs' arg1_tab_completer: - suggestion - autotab
does not seem to work, even just "tab_completer" does not seem to work. Only registering gives player names.
You still need to put register: true. If the command isn't registered can't have a tab completer on it. There is a prebuild example in the plugin, in examples.yml just check that. If that works, i can't help you.
test: command: /test type: RUN_COMMAND runcmd: - '$text$hello $multiargs'
register: true tab_completer: - suggestion - autotab
copied your example and when press TAB only playernames are listed still.
I see, you need to restart the server if you add the line tab-completer while the server is on. Or reload only Mycommand as whole with things like Plugman, but i suggest to restart the server. You can edit the list of suggestion live once it is online, but the tab completer activate only when the command get registered, so on server start or MyCommand gets disabled and re-enabled as whole. ANd i don't think it's easy to make it update "live" without needing a restart. It's a bit complex.
To post a comment, please login or register a new account.