/function

Runs commands found in the corresponding function file.

Operator (cheats on)Cheats must be onChecked on 1.26.66.1

Syntax

Exactly as the game prints it. <angle brackets> are required, [square brackets] are optional.

/function <name: filepath>

What we found when testing

Notes from running this command on a real Bedrock Dedicated Server (1.26.66.1).

A function reports how many lines ran

Running a function from the console prints "Successfully executed N function entries", where N counts the commands that ran. A name that does not exist prints "Function <name> not found", which is the quickest way to confirm a behavior pack is active in the world.

More from 9Minecraft

Command reference © 2026 9Minecraft.net. Syntax read from Minecraft Bedrock Edition 1.26.66.1.