#(dotheflopboy) how to hide tabcompletes/autocomplete for commands with no permissions?
29 messages · Page 1 of 1 (latest)
(dotheflopboy) how to hide tabcompletes/autocomplete for commands with no permissions?
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
is this for external commands? (commands from other plugins)
yes for all commands
if you just write / in chat there will be tabcomplete for all plugins but i just want it for commands the player has permission for
!e tab complete
Server
tab complete
command:<command_name> to only process the event if the command matches the input name.
when a player or the console is sent a list of available tab completions.
when the tab completion is done by a player. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
<context.buffer> returns the full raw command buffer.
<context.command> returns the command name.
<context.current_arg> returns the current argument for completion.
<context.completions> returns a list of available tab completions.
<context.server> returns true if the tab completion was triggered from the console.
ListTag to set the list of available tab completions.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
Player
player receives commands
when the list of available server commands is sent to the player for tab completion.
Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
<context.commands> returns a ListTag of received commands.
ListTag to set the player's available commands. NOTE: It is not possible to add entries to the command list, only remove them.
This one.
is there a way to get all commands the player has permissions for?
I'm unaware.
Some commands do not require a permission
It really depends on what plugins you are using
It's technically a thing the plugin authors should fix
But if you want fix it from denizen way, well
You can use the player receives commands event and exclude commands
and use the on command event to prevent users from using it
ok, and is there a way to sort the list of tab completions?
or rather make your own order of commands?
Isn't it alphabetical by default?
Determining a list in player receives commands lets you dictate what commands the player will get for tabh completion.
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@spring acorn