Datapack
/function
Run a datapack function file.
Syntax
Parameters
- name
- function ID
- Namespaced function, e.g. mypack:setup.
Command builder
Configure the options below to generate a ready-to-paste /function command.
Form namespace:path, e.g. mypack:setup.
/function <namespace>:<path>Examples
Run mypack/data/mypack/functions/setup.mcfunction.
Permission level
/function requires Cheats (op level 2). In single-player you need the world's "Allow Cheats" toggle on. On a multiplayer server you need to be opped — see /op.