mojira.dev
MC-116960

Command block auto-complete suggests player-only commands

The /reload command is only available to opped players in singleplayer and multiplayer.
So are /stop, /kick, /ban, etc. in multiplayer.

Although when inserting "/r" and "Tab" a couple of times, the list will suggest /reload.
Likewise with "/s", "/k", "/s", etc.

This happens because the same list of commands available for an opped player is used in the command block as well.

What should happen: All commands that the command block has no permission to, need not to be suggested using tab completion.

This can be achieved by only showing commands for players with op-level=2
(because any regular commands are shown to players with this op-level correctly)

This may confuse newer players why those commands would not work in a command block, because clearly they are suggested. (And the error message might need some attention too: "This command can not be run by command blocks")

Linked issues

Comments 4

It only happens with /reload for me in 1.12.1. /ban, /kick and /stop don't appear for me.

Still an issue, now that MC-122134 has been fixed.

You can add a tag to this issue: brigadier

Can confirm in 1.16.5 and 21w07a.

AgentM

(Unassigned)

Confirmed

(Unassigned)

/ban, /ban-ip, /deop, /kick, /op, /publish, /reload, /stop, brigadier, command, command_block, op, permission, tab-completion

Minecraft 17w18a, Minecraft 1.12 Pre-Release 5, Minecraft 1.12 Pre-Release 6, Minecraft 1.12.1, Minecraft 1.12.2 Pre-Release 1, ..., 1.14.4, 1.15 Pre-release 6, 1.16.5, 21w07a, 24w38a

Retrieved