WHAT ARE COMMANDS?
Commands are instructions you type in chat to control Minecraft. They do instantly what would take minutes by hand. This is the slash you’ll use everywhere.
📋 You can copy this exactly — it will work.
▸ Breakdown
/— marks this as a commandsay— the actionHello— the message to print
Type /say I learned commands in chat. Press Enter. Your message appears in yellow at the top of chat.
Your “command” appears as a normal white chat message.
You forgot the /.
Always start with / — e.g. /say Hello.
Press ↑ in chat to recall the last command.
COORDINATES (X, Y, Z)
Now that you can run a command, tell Minecraft where. Coordinates pin down an exact block — X (east-west), Y (up-down), Z (south-north).
📋 You can copy this exactly — it will work.
This is what every other command points at — once you read XYZ fluently, the rest of the course clicks into place.
▸ Breakdown
/tp— teleport@s— yourself0 100 0— X (east), Y (up), Z (south)
▸ Quick version
/tp @s ~ ~50 ~Run /tp @s 0 200 0. Press F3 — the XYZ line shows roughly 0 / 200 / 0. You're high above spawn.
Teleporting drops you in lava or out of the world.
Your Y is too low (sea level is 64, bedrock is −64).
Use Y = 200 to land safely in the sky.
Press F3 any time to read your live X, Y, Z.
RELATIVE COORDINATES (~)
Absolute coords are precise. Relative coords (~) move you from where you already are — add a number to offset.
~ = where I am. A number after it shifts me on world axes.
▸ Breakdown
~— keep current X~10— current Y plus 10~— keep current Z
▸ Quick version
/tp @s ~ ~50 ~Run /tp @s ~ ~50 ~. You shoot straight up 50 blocks. Run it again — you go up another 50.
Chat says “Expected whitespace.”
You wrote ~ 10 with a space.
Write ~10 with no space.
Three plain ~ ~ ~ means “exactly where I am.” Useful default for spawning structures at your feet.
LOCAL COORDINATES (^)
~ follows world axes. ^ follows your facing — left, up, forward — no matter which way you look. Don’t worry if this feels weird at first — it clicks after a few tries.
~ follows the world. ^ follows your face.
▸ Breakdown
^— no left/right offset^— no up/down offset^5— 5 blocks forward
▸ Quick version
/tp @s ^ ^ ^10Face north, run /tp @s ^ ^ ^10 — you move 10 north. Turn east, run it again — you move 10 east. Same command, new direction.
The teleport behaves randomly or fails.
You mixed ^ and ~ in one command.
Pick one system — all ^ or all ~.
Local coords are perfect for “dash forward” mechanics or aiming particles in front of the player.
TARGET SELECTORS
Coordinates pick a place; selectors pick who. Used in nearly every command.
@p nearest, @a all, @s self, @e every entity, @r random.
▸ Breakdown
@p— nearest player@a— all players@s— self@e— all entities (mobs, items, arrows…)@r— a random player
▸ Quick version
/give @a minecraft:diamondRun /give @a minecraft:diamond. Open inventory — one diamond appears. Now change @a to @r and run it again — in multiplayer, only a random player gets one.
/kill @e wipes mobs, paintings, and dropped items all at once.
@e means every entity, not just players.
Use @a for players, or @e[type=zombie] to filter.
Add [limit=1,sort=random] for raffles: @a[limit=1,sort=random].
- Run any command on every player at once
- Filter to nearby, self, or one random player
- Target mobs and items with
@e[type=...]
TIME & WEATHER
Selectors handle who; these handle the world. Skip night, kill rain, freeze the sky in seconds.
▸ Breakdown
/time set— set time of dayday— sun rises (alsonight,noon,midnight)/weather— set weatherclear— sun (alsorain,thunder)
▸ Quick version
/time set dayRun /time set day at night. The sun jumps up. Then /weather thunder — clouds roll in instantly.
Chat says “Unknown command” on /time day.
You skipped set.
Use /time set day.
Combine with /gamerule doDaylightCycle false (next lesson) to lock the sun.
SPAWN & RESPAWN
World commands cover when. Spawn commands cover where you start — world spawn for new players, spawnpoint for respawning.
▸ Breakdown
/setworldspawn— set the global world spawn~ ~ ~— use my current position/spawnpoint— set my personal respawn point@s— self
▸ Quick version
/spawnpoint @sStand somewhere fun. Run /spawnpoint @s, then /kill @s. You respawn at the spot you set.
New players keep landing in the wrong spot.
You set /spawnpoint (per-player) instead of /setworldspawn.
Run /setworldspawn ~ ~ ~ where new players should appear.
Sleeping in a bed sets your spawnpoint automatically — same effect, no command needed.
GAMERULES
Spawnpoint tweaks one player. Gamerules tweak the whole world — turning features on or off across every player and chunk.
▸ Breakdown
/gamerule— change a global rulekeepInventory— the rule (case-sensitive)true— turn it on (usefalseto turn off)
▸ Quick version
/gamerule keepInventory true▸ Combined: lock day + clear sky + keep items
Three commands — permanent daylight, no item loss. Run them once at the start of any test world.
Run /gamerule keepInventory true. Then /kill @s. Your inventory survives the death.
A gamerule appears to do nothing.
You misspelled the name — gamerule names are case-sensitive.
Type /gamerule keep and press Tab to auto-complete.
High-impact rules: doMobSpawning, mobGriefing, doFireTick, showDeathMessages.
GIVING ITEMS
World rules are set — now you need gear. /give spawns any item directly into a player's inventory.
📋 You can copy this exactly — it will work.
▸ Breakdown
/give— put items in inventory@p— player to give to (nearest)minecraft:diamond— the item (always namespaced)5— how many
▸ Quick version
/give @s minecraft:netherite_sword▸ Combined: arm and buff every player
/give + /effect + @a = arm and buff every player at once.
Run /give @s minecraft:golden_apple 64. Open inventory — a full stack appears.
Chat says “Unknown item: diamond.”
You skipped the minecraft: namespace.
Use /give @p minecraft:diamond, or Tab-complete after mi.
In 1.21+, append components to enchant: ...netherite_sword[enchantments={levels:{"minecraft:sharpness":5}}].
EFFECTS
Items go in inventory; effects go on the player. /effect give grants temporary abilities like speed, jump boost, or night vision.
▸ Breakdown
/effect give— apply an effect@p— who gets itminecraft:speed— the effect10— duration in seconds1— amplifier (level − 1, so 1 = Speed II)
▸ Quick version
/effect give @s minecraft:night_vision 99999 1 trueRun /effect give @s minecraft:night_vision 99999 1 true. Walk into a cave — everything looks fully lit, no swirly particles.
Chat says “Unknown command” on /effect @p speed 10 1.
That's Bedrock syntax.
Java needs give: /effect give @p minecraft:speed 10 1.
Trailing true hides the swirly particles — cleaner look, identical effect.
BASIC BUILDING COMMANDS
Effects modify the player; building commands modify the world. /fill and /setblock place blocks instantly.
📋 You can copy this exactly — it will work.
▸ Breakdown
/fill— fill a region with a block~ ~ ~ ~5 ~5 ~5— two corners — here, to 5 east/up/southminecraft:glass— the block/setblock— place a single block
▸ Quick version
/fill ~-2 ~ ~-2 ~2 ~4 ~2 minecraft:glass hollow▸ Combined: instant safe room around any player
execute at @p run fill places the cube around the nearest player — wherever they are.
Stand in an open area. Run the quick version. A 5-tall hollow glass cube wraps around you — instant safe room.
The fill suffocates you instantly.
Your corners overlapped your body and filled solid blocks.
Add hollow after the block, or /tp @s ~ ~5 ~ first.
Modes: hollow (shell), outline (frame), keep (don't replace), destroy (drop old blocks).
FINAL PROJECT
You've covered every basic Java command. This last lesson is the checklist for a fresh test world in 30 seconds.
📋 You can copy this exactly — it will work.
▸ Breakdown
Time set day— lock daytimeWeather clear— kill the rainkeepInventory true— no item loss on deathGive sword— arm yourselfEffect speed— Speed II for 30s
▸ Test-world checklist
- □Daylight —
/time set day. Optional/gamerule doDaylightCycle falseto lock it. - □Clear sky —
/weather clearkills active rain or thunder. - □Keep items —
/gamerule keepInventory true. - □Loadout —
/give @p minecraft:diamond_sword— or any item via Tab-complete. - □Buff —
/effect give @p minecraft:speed 30 1 true. - □Spawn lock — Stand at your starting spot, run
/spawnpoint @s.
Save the five commands in a Notepad file. Open a fresh Creative world, paste them line by line. Time to ready: under 30 seconds.
keepInventory “doesn't work” on your first death.
You died before setting the rule.
Run the gamerule first, then test.
Every command from here builds on these five concepts: coords, selectors, world state, items, effects.
- Spin up a fresh test world in 30 seconds
- Target any player, mob, or entity with selectors
- Set world rules, time, and weather on demand
- Hand out items and effects to anyone — including everyone at once
Every command from here builds on these five concepts: coords, selectors, world state, items, effects. Emerald is where you start chaining them into systems.
You’re no longer typing commands — you’re using them.