Skip to main content
MC COMMANDS logoMC COMMANDS
BUILDER'S COMPANION

Minecraft Commands for Building.

Master coordinates and structures. Construct, clone, and manipulate blocks efficiently using advanced builder cheats like /fill and /setblock.

REFERENCE GUIDE

Syntax and coordinates reference.

A quick reference cheat sheet explaining target selectors, absolute coordinate grids, relative offsets, and local direction-facing grids.

Target Selectors

Minecraft uses shorthand variables called "target selectors" to target specific players or entities without writing full usernames.

@p

Nearest Player

Targets the single player closest to where the command is executed.

@a

All Players

Targets every online player in the current dimension/world.

@r

Random Player

Targets one random player (commonly used in minigames/lobbies).

@e

All Entities

Targets all living things, including players, mobs, dropped items, and item frames.

@s

Self (Executor)

Targets the entity currently running the command (useful in command blocks and chat).

Coordinate systems

Minecraft locations use a 3D grid layout represented as X Y Z coordinates (East/West, Altitude, North/South).

X Y Z

Absolute Coordinates

Specifies an exact point on the world map. 100 64 -250 means block X=100 (East), Y=64 (Sea Level elevation), Z=-250 (North).

~ ~ ~

Relative Coordinates (Tilde)

Specifies block offsets relative to the execution origin. E.g., ~ ~5 ~ represents exactly 5 blocks directly above where the command runs.

^ ^ ^

Local Coordinates (Caret)

Specifies block offsets relative to where the executing entity is currently looking (Left/Right, Up/Down, Forward/Backward). E.g., ^ ^ ^5 is 5 blocks directly in front of the executor's face.

AxisPositive Value (+)Negative Value (-)
X AxisEastward displacementWestward displacement
Y AxisUpward altitude (Sky)Downward altitude (Void)
Z AxisSouthward displacementNorthward displacement
BUILDING COMMAND DIRECTORY

Filtered building codes list

COMMAND DIRECTORY

Search and filter commands.

itemsJava & Bedrock

Gives an item to one or more players, with optional counts, metadata, and components.

Java Edition/give <targets> <item> [<count>]
Bedrock Edition/give <player> <itemName> [amount] [data] [components]
playerJava & Bedrock

Teleports entities (players, mobs, etc.) to a specific coordinate or destination entity.

/tp <targets> <destination> | /tp <targets> <x> <y> <z> [<yRot> <xRot>]
playerJava & Bedrock

Changes the game mode of a player (Survival, Creative, Adventure, or Spectator).

/gamemode <mode> [<target>]
entityJava & Bedrock

Spawns a specified entity (mob, projectile, item frame, etc.) at coordinates.

Java Edition/summon <entity> [<pos>] [<nbt>]
Bedrock Edition/summon <entityType> [<spawnPos>] [<spawnEvent>] [<nameTag>]
worldJava & Bedrock

Enables, disables, or modifies game rules (like daylight cycle, fire damage, mob drops).

/gamerule <rule> [<value>]
playerJava & Bedrock

Adds, removes, or clears status effects (like Speed, Poison, Haste, Strength) on players or mobs.

Java Edition/effect give <targets> <effect> [<seconds>] [<amplifier>] [<hideParticles>] | /effect clear <targets> [<effect>]
Bedrock Edition/effect <player> <effect> [seconds] [amplifier] [hideParticles: Boolean] | /effect <player> clear
developerJava & Bedrock

Executes a command from the perspective of another entity, location, dimension, or matching conditions.

Java Edition/execute <subcommand> -> run <command>
Bedrock Edition/execute <subcommands> run <command>
worldJava & Bedrock

Finds the nearest structure, biome, or point of interest (POI) and prints coordinates in chat.

Java Edition/locate structure <structureID> | /locate biome <biomeID> | /locate poi <poiID>
Bedrock Edition/locate structure <structureType> | /locate biome <biome>
worldJava & Bedrock

Fills a 3D region between two coordinates with a specific block, optionally replacing other blocks.

Java Edition/fill <fromX> <fromY> <fromZ> <toX> <toY> <toZ> <block> [destroy|keep|replace|hollow|outline]
Bedrock Edition/fill <fromX> <fromY> <fromZ> <toX> <toY> <toZ> <block> [tileData] [replace|destroy|keep|hollow|outline]
playerbedrock

Applies a screen shaking effect to players, useful for cinematics or custom maps.

Bedrock Edition/camerashake add <players> [intensity] [seconds] [shakeType] | /camerashake stop [players]
worldbedrock

Creates, lists, or removes ticking areas, forcing the game to simulate chunks even when no players are nearby.

Bedrock Edition/tickingarea add <fromX> <fromY> <fromZ> <toX> <toY> <toZ> [name] | /tickingarea add circle <x> <y> <z> <radius> [name] | /tickingarea remove <name|pos>
worldjava

Forces chunks to constantly load and simulate, even if no players are nearby. Equivalent to ticking areas.

Java Edition/forceload add <fromX> <fromZ> [<toX> <toZ>] | /forceload remove <fromX> <fromZ> [<toX> <toZ>] | /forceload query [<pos>]
worldjava

Controls the boundaries of the world, allowing you to shrink, expand, center, and damage players outside of it.

Java Edition/worldborder set <size> [<time>] | /worldborder center <x> <z> | /worldborder damage <buffer|amount>
playerbedrock

Sets character abilities (like World Builder permissions, flying, or mute) on a player.

Bedrock Edition/ability <player> <ability> [value: Boolean]
developerbedrock

Triggers dialogue screens or forces an NPC to display a dialogue branch to players.

Bedrock Edition/dialogue open <npc> <player> [sceneName] | /dialogue change <npc> <sceneName> [targets]
developerjava

Creates and modifies custom boss health bars at the top of the screen (e.g. for custom boss fights).

Java Edition/bossbar add <id> <name> | /bossbar set <id> <option> <value> | /bossbar remove <id>
opJava & Bedrock

Gives a player an overpowered Netherite Sword with level 255/10 enchantments.

Java Edition/give <targets> netherite_sword[enchantments={levels:{"minecraft:sharpness":255,"minecraft:fire_aspect":10,"minecraft:looting":10,"minecraft:unbreaking":255,"minecraft:mending":1,"minecraft:sweeping_edge":3,"minecraft:knockback":5}}] [<count>]
Bedrock Edition/give <player> netherite_sword [amount]
opjava

Gives a player a stick with Knockback level 10,000, sending targets flying into the distance.

Java Edition/give <targets> stick[enchantments={levels:{"minecraft:knockback":10000}}] [<count>]
opJava & Bedrock

Gives a player a Netherite Chestplate with Protection level 255 and Thorns 10, rendering the wearer practically invincible.

Java Edition/give <targets> netherite_chestplate[enchantments={levels:{"minecraft:protection":255,"minecraft:unbreaking":255,"minecraft:mending":1,"minecraft:thorns":10}}] [<count>]
Bedrock Edition/give <player> netherite_chestplate [amount]
opJava & Bedrock

Gives a player a Netherite Pickaxe with Efficiency level 255, breaking blocks instantly.

Java Edition/give <targets> netherite_pickaxe[enchantments={levels:{"minecraft:efficiency":255,"minecraft:fortune":10,"minecraft:unbreaking":255,"minecraft:mending":1}}] [<count>]
Bedrock Edition/give <player> netherite_pickaxe [amount]
opJava & Bedrock

Gives a player a Bow with Power level 255, Punch level 10, Flame, and Infinity.

Java Edition/give <targets> bow[enchantments={levels:{"minecraft:power":255,"minecraft:punch":10,"minecraft:flame":1,"minecraft:infinity":1,"minecraft:unbreaking":255}}] [<count>]
Bedrock Edition/give <player> bow [amount]
opjava

Gives a player a stack of custom food items (cookies) that grant Strength level 255 and Resistance level 255 for one minute.

Java Edition/give <targets> cookie[food={nutrition:20,saturation:20,effects:[{effect:{id:"minecraft:strength",amplifier:255,duration:1200}},{effect:{id:"minecraft:resistance",amplifier:255,duration:1200}}]}] [<count>]
utilityJava & Bedrock

Manages the server player whitelist, allowing only approved players to join the server.

/whitelist <add|remove> <player> | /whitelist <on|off|list|reload>
utilityJava & Bedrock

Disconnects a specified player from the server immediately, optionally displaying a reason.

/kick <player> [reason]
utilityJava & Bedrock

Adds a player to the server's blacklist (ban list), preventing them from reconnecting.

/ban <player> [reason]
utilityJava & Bedrock

Removes a player from the server's ban list, permitting them to join the server again.

/pardon <player>
developerJava & Bedrock

Reloads all data packs, functions, advancements, and loot tables from disk.

/reload
developerjava

Controls the server tick rate and flow, allowing developers to freeze, step, or sprint game execution for diagnostic testing.

Java Edition/tick rate <rate> | /tick freeze | /tick step <time> | /tick query
developerjava

Starts or stops recording performance metrics, generating a diagnostic ZIP report in the server's debug folder.

Java Edition/perf start | /perf stop
developerjava

Manages the server's loaded data packs, allowing creators to dynamically enable, disable, and order them.

Java Edition/datapack enable <name> [first|last|before|after] | /datapack disable <name> | /datapack list
utilityJava & Bedrock

Forces the server to save all pending chunks, player profiles, and world data to disk immediately.

/save-all [flush]
developerJava & Bedrock

Runs a function script file (.mcfunction) containing a sequence of commands in a single game tick.

/function <name>