Prevent functions from showing in autofill command window
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.
Solution 1:
I think this is possible. I know this is very old, but I haven't found any other threads on this topic. I've been making a function pack for a custom minigame/gamemode, and the startGame function does not appear in the autofill. I'm not really sure why it does this, but it's shows it's possible. With autofill Without autofill
I just looked further into it, and there are a number of functions that are not in the autofill window. The thing all these have in common are my comments; by typing //
. This does not invalidate the code, as actual comments use #
, but using //
hides the function from autofill; it can still be called, but cannot be seen.