2

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.

2 Answers 2

0

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.

1
  • That is what I thought and was afraid of. I really like that solution though! Auto_complete will be managable using a namespace starting with z for all my utility functions and all the functions that are meant to be called in an uncluttered space. Kudos for a solution that will solve most of my problem. When typing I will go; /function mynamesp... and see a short list of intended to be used commands, and never really see the z:myutilityspace namespace. It does make the datapacks directory a little more clunky, with new problems if I were to use a shared zutility space for multiple packs. Commented Jul 6, 2018 at 14:34
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.

2
  • this isnt even the right version of the game
    – Penguin
    Commented Mar 18, 2021 at 1:07
  • Oh sorry, I didn't see the java edition tag; I was looking for bedrock edition stuff, so I assumed this was bedrock. My bad Commented Mar 18, 2021 at 17:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .