Command Reference
Minecraft /function Command
developerJavaBedrock
Runs a function script file (.mcfunction) containing a sequence of commands in a single game tick.
Version Compatibility
Java Edition:1.21.4 (1.13+)
Bedrock Edition:1.21.60
Command Syntax
Both Editions
/function <name>Arguments Explained
nameResource IDRequiredNamespace location of the function (e.g. namespace:function_name).
Practical Examples
/function arena:start_matchExecutes the commands defined in the "start_match" function within the "arena" datapack.
Important Notes
Functions are the foundation of custom game loops, mini-games, and map setups. Since they run on the server side in a single tick, they are significantly more efficient than long chains of command blocks.