Skip to main content
MC COMMANDS logoMC COMMANDS
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

Practical Examples

/function arena:start_match

Executes the commands defined in the "start_match" function within the "arena" datapack.

Advertisement

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.

Advertisement