Skip to main content

COMMANDS

Bedrock Edition command syntax, examples, and key differences from Java.

8 guides in this category

Cheats, achievements and permission levels

Most commands need cheats. You can turn them on when you create a world or later in the Cheats tab of the settings, but from that moment the world can no longer earn achievements, and switching cheats off again does not bring them back. Commands run from a server console, a function or a script work without cheats.

What a player may run also depends on their permission level. Everyone who joins a world starts at level 0, the host of a local world has level 3, and a Realm owner has level 1.

Level 0, Any
Chat commands such as /help, /list, /me and /tell.
Level 1, Game Directors
The everyday commands, from /give, /tp and /fill to /summon, /effect and /execute. Operators on Realms and external servers get this level.
Level 2, Admin
Adds /op, /deop, /place and /reload. Command blocks run at this level.
Level 3, Host
Adds /setmaxplayers, which is why a command block cannot run it.
Level 4, Owner
Server administration such as /allowlist, /changesetting, /save, /stop and /transfer.

Making another player an operator also turns achievements off for that world, permanently.

Commands only Bedrock has

/tickingarea
Keeps chunks loaded with no player nearby, as a rectangle or a circle, with up to 10 areas at a time. Java does the same job with /forceload.
/testfor
Counts entities that match a selector, while /testforblock checks for one block and /testforblocks compares two regions. Java removed all three in 1.13 and uses /execute if instead.
/replaceitem
Puts an item into a given slot of a player, a mob or a container. Java replaced it with /item replace in 1.17.
/toggledownfall
Turns clear weather into rain or snow, and rain, snow or a thunderstorm back into clear skies. Java dropped it in 1.13.
/mobevent
Switches the ender dragon, pillager patrol and wandering trader events on or off, or every mob event at once.
/inputpermission
Switches a player's camera, movement, jumping, sneaking, mounting and dismounting on or off.
/camera, /fog, /hud
Custom camera views and screen fades, fog settings per player, and hiding parts of the HUD.
/structure
Saves a build and loads it somewhere else without placing structure blocks.
/daylock
Stops the day-night cycle or lets it run again. /alwaysday is the same command under another name.

Java commands that will not paste into Bedrock

Target selectors
Bedrock writes r and rm for distance, c for the number of targets, l and lm for levels and m for game mode, where Java uses distance, limit with sort, level and gamemode. A negative c starts with the furthest targets. Bedrock adds family, hasitem and haspermission, and has no nbt, predicate, team or advancements.
Experience
Bedrock gives points with /xp 7 and levels with /xp 7L. The Java form, /xp add @s 7 levels, is not Bedrock syntax.
NBT
There is no /data command in Bedrock, so anything that reads or edits NBT in Java has no direct Bedrock version.
Missing commands
/bossbar, /team, /worldborder, /attribute, /trigger and /advancement do not exist in Bedrock.
/execute
Bedrock switched to the Java style of subcommands in 1.19.50, but it has eleven of them where Java has fourteen, and no store. Tutorials that write execute @a ~ ~ ~ date from before that change.

The complete Bedrock commands guide covers the basics, and these commands each have a page of their own: /give, /tp, /fill, /summon, /effect, /gamemode and /execute.

All Guides