#(dotheflopboy) how to hide tabcompletes/autocomplete for commands with no permissions?

29 messages · Page 1 of 1 (latest)

spring acorn
#

Hey i want to hide all commands the player doesn't have permissions for. If the player write / that only the commands that the player can execute are displayed.

hot hemlockBOT
#

(dotheflopboy) how to hide tabcompletes/autocomplete for commands with no permissions?

hot hemlockBOT
#

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.

vale ivyBOT
primal hollow
#

is this for external commands? (commands from other plugins)

spring acorn
#

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

scarlet pasture
#

!e tab complete

scenic flareBOT
# scarlet pasture !e tab complete
Group

Server

Event Lines

tab complete

Switches

command:<command_name> to only process the event if the command matches the input name.

Triggers

when a player or the console is sent a list of available tab completions.

Has Player

when the tab completion is done by a player. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<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.

Determine

ListTag to set the list of available tab completions.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

scarlet pasture
#

Hmm.

#

I did this too, one second.

#

!e player receives commands

scenic flareBOT
# scarlet pasture !e player receives commands
Group

Player

Event Lines

player receives commands

Triggers

when the list of available server commands is sent to the player for tab completion.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.commands> returns a ListTag of received commands.

Determine

ListTag to set the player's available commands. NOTE: It is not possible to add entries to the command list, only remove them.

scarlet pasture
#

This one.

spring acorn
#

is there a way to get all commands the player has permissions for?

scarlet pasture
#

I'm unaware.

nocturne dock
#

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

spring acorn
#

ok, and is there a way to sort the list of tab completions?

#

or rather make your own order of commands?

scarlet pasture
#

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.

quasi oakBOT
#
Thread Closing Reminder

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