Our Discord Find a crew to play with. Join
Discord
Our Discord Build. Chat. Belong. Find a crew and show off your builds. Join the crew
Bedrock Edition Medium Guide 2 of 22

Commands in Bedrock Edition

Commands in Bedrock: syntax, differences from Java and practical examples.

Introduction

The command system in Minecraft Bedrock Edition differs from Java Edition in both syntax and the commands available. In Bedrock you type commands in the chat (the T key on PC, the chat icon on mobile devices) or in command blocks. To use commands in a singleplayer world, you have to turn on the "Activate Cheats" option when you create the world. Keep in mind that this disables achievements in that world. Many commands are shared by both editions, but Bedrock has a few of its own, such as /camerashake, /dialogue, /mobevent, /music, /playanimation, /structure and /tickingarea. On the other hand, some Java commands, like /data, /attribute and /bossbar, don't exist in Bedrock. Target selector syntax (the @a, @p, @r, @e and @s selectors) is similar, but Bedrock adds its own filters, for example hasitem, has_property, family and haspermission. Command blocks in Bedrock come in three types, exactly as in Java: Impulse (runs once), Chain (runs as part of a chain) and Repeat (runs repeatedly), but the execution order and ticking can differ slightly. Bedrock also supports function files placed in behavior packs, which let you automate complex sequences of commands without typing them in by hand. Since version 26.0 (February 2026), you can bind commands to shortcuts when you play with a keyboard and mouse: in Settings → Keyboard & Mouse, the Macros section has 10 command macro slots, and you run each one with Alt + a key of your choice. The slash at the start of a command is optional, and if a command fails, the game shows a command macro notification. Colored text works differently too: in Bedrock you set the color and style with codes that use the § symbol (for example §9 is blue), including in the rawtext JSON of the /tellraw command, while Java Edition uses separate text component fields such as color and bold.

Topics covered

  1. Turning on cheats in Bedrock
  2. Syntax differences from Java
  3. Bedrock-only commands: /camerashake, /dialogue, /music
  4. Selectors and filters: @a, @p, @r, @e, @s
  5. Command blocks: Impulse, Chain, Repeat
  6. Function files
  7. Formatting text with the § symbol
  8. Command macros: Alt + a key (since 26.0)

Practical tips

  • Turning on cheats permanently disables achievements in that world, so create a separate test world for experimenting with commands.
  • Assign a command you use often, such as /time set day, to a macro in Settings → Keyboard & Mouse: after that, Alt + a key runs it without opening the chat.
  • On mobile devices, typing commands is much easier with an external Bluetooth keyboard.
  • Put function files (.mcfunction) in the behavior_pack/functions/ folder and run them with the /function file_name command.
  • Use /tickingarea to keep a chunk loaded even when no player is nearby, which is handy for farms and redstone systems.

Tags

commandsbedrockcommand blocksyntaxselectorsfunctions

Related Bedrock guides

Marketplace: a guide to the Bedrock store
Beginner
Realms in Bedrock Edition
Easy
Add-ons in Bedrock Edition: a guide
Medium
Resource packs in Bedrock Edition
Medium