Minecraft – Prevent functions from showing in autofill command window

minecraft-commandsminecraft-java-edition

With the new datapacks features and ability to easily add multiple datapacks, the autofill window can become very cluttered with function names – especially including functions that are not meant to be invoked directly (called by tick-loop, adventures, other functions, signs, etc.)

For debugging/development/user interface reasons, I would prefer to have a way to have some functions be hidden from autofill, so that they cannot be called directly, perhaps even a way to have completely disabled as executable from the command prompt.

Is there a way to do this? From my google attempts some servers have tools to limit certain commands and player abilities overall, but I just don't want to have certain functions displayed by autofill or as an extension don't want certain functions to be executable or viewable at all in game – through chat or command blocks. I can't imagine that this is a unique concern or annoyance. My Autofill chat is incredibly cluttered until I really narrow-down on keying the function name with a very large number of functions that aren't ever meant to be called directly by chat.

A naming convention or separate extension could really help with this. For example by giving them a .mcprivate extension or starting the file names with z_ or designating /sub/ as a generic folder name for hidden functions.

Best Answer

This is not possible. Autocomplete always shows all options (except where there are nearly infinitely many, like in a scoreboard name) and functions don't have a permission system by themselves.

The best you can do is to put all functions that users should execute into one namespace and all automatically called functions into another, that way you can enter /function run: and autocomplete from there.