Minecraft wiki entry for Command_blocks_and_functions, associated text: By swapping gamemode it is possible to use command blocks and functions in single player outside of creative mode. Simply swap to creative mode with the /gamemode creative command, set the command block command to whatever the player want, then swap back to /gamemode survival. The command block only needs to be set in creative, but will still function once back in normal.