Updated 24 October 2026. Every answer lists its source.
Minecraft command questions, answered
The commands people look up most, written as plain examples, with the Java and Bedrock spelling where they differ.
How do you turn on cheats in Minecraft?
Turn on Allow Commands when you create the world. On Java 26.2+ you can also switch it on later in Pause, World Options.
On Bedrock, cheats can be switched on later in the world settings, but the world then stops earning achievements.
Source: Minecraft Wiki - Commands, Minecraft Wiki - Java Edition 26.2
How do you type a command in Minecraft?
Press / (slash) on Java to open chat with the slash ready, type the command and press Enter. On Bedrock open chat and start with /.
Press Tab on Java to auto-complete command names, players and items.
Source: Minecraft Wiki - Commands
Why does it say "Unknown or incomplete command"?
The command is spelled wrong, missing a part, or does not exist in your edition or version. Use Tab to see valid options.
Source: Minecraft Wiki - Commands
What are relative coordinates in Minecraft commands?
A tilde (~) means "from where I stand". ~ ~5 ~ is five blocks above you. A caret (^) works from where you are looking.
Source: Minecraft Wiki - Coordinates
Are Java and Bedrock commands the same?
Most names match, but the syntax often differs. For example Java uses /experience add while Bedrock uses /xp, and some commands exist in only one edition.
Source: Minecraft Wiki - Commands
How do you teleport to coordinates in Minecraft?
Type /tp @s x y z, for example /tp @s 100 64 -200. Use ~ to move relative to where you are.
Source: Minecraft Wiki - Teleport
How do you teleport to another player?
Type /tp YourName TheirName, or /tp TheirName to go to them yourself.
Source: Minecraft Wiki - Teleport
How do you teleport to spawn with a command?
There is no vanilla /spawn command. Use /tp with the world spawn coordinates, or die to respawn. Servers often add /spawn with a plugin.
How do you set the time to night in Minecraft?
Type /time set night (time 13000). /time set midnight gives 18000 and /time set noon gives 6000.
Source: Minecraft Wiki - Time
How do you stop the day and night cycle?
Turn the cycle off with /gamerule advance_time false on Java 1.21.11+, or /gamerule doDaylightCycle false on Bedrock and Java before 1.21.11.
Source: Minecraft Wiki - Game rule
How do you make it rain in Minecraft?
Type /weather rain. /weather thunder starts a storm and /weather clear ends it. Add a duration to set how long it lasts.
A plain number is in game ticks (20 per second) on both editions. Java also takes units, such as 300s or 1d.
Source: Minecraft Wiki - Weather
How do you find your coordinates with a command?
On Bedrock turn on Show Coordinates in world settings. On Java press F3. Servers often add a /coords command.
Source: Minecraft Wiki - Coordinates
How do you find a biome with commands?
Type /locate biome minecraft:cherry_grove (or another biome name). The game tells you the nearest one and how far it is.
Source: Minecraft Wiki - Locate
How do you see the world seed?
Type /seed. On a server it needs operator rights. On Bedrock the seed is also shown in the world settings.
Source: Minecraft Wiki - Seed
How do you set the world spawn?
Stand where you want spawn and type /setworldspawn. /spawnpoint sets one player's personal respawn point instead.
Source: Minecraft Wiki - Setworldspawn, Minecraft Wiki - Spawnpoint
How do you change the world border with a command?
Type /worldborder set 1000 for a 1,000-block-wide border. /worldborder center x z moves its centre.
Source: Minecraft Wiki - Worldborder
How do you freeze time with /tick?
On Java 1.20.3+, /tick freeze stops mobs, crops and redstone while players can still move. /tick unfreeze starts it again.
/tick rate changes the game speed, and /tick step runs one tick at a time.
Source: Minecraft Wiki - Tick
How do you give yourself XP with commands?
On Java type /experience add @s 30 levels (or /xp add @s 30 levels). On Bedrock type /xp 30L @s.
Source: Minecraft Wiki - Experience
How do you clear your inventory with a command?
Type /clear. /clear @s minecraft:dirt removes only dirt. This cannot be undone.
Source: Minecraft Wiki - Clear
How do you kill all mobs with a command?
/kill @e[type=!player] kills every loaded entity except players, including dropped items and pets, so use it carefully.
To kill one kind only, use /kill @e[type=zombie].
Source: Minecraft Wiki - Kill
How do you kill dropped items with a command?
Type /kill @e[type=item] to remove every dropped item in loaded chunks. It helps with lag.
Source: Minecraft Wiki - Kill
How do you heal yourself with commands?
Give instant health: /effect give @s instant_health 1 5 on Java, or /effect @s instant_health 1 5 on Bedrock.
Source: Minecraft Wiki - Effect
How do you clear effects with a command?
Type /effect clear @s on Java, or /effect @s clear on Bedrock.
Source: Minecraft Wiki - Effect
How do you give a player a potion with commands?
On Java use /give @s potion[potion_contents={potion:"minecraft:swiftness"}]. Bedrock uses the potion's data value instead.
How do you make a mob not despawn with commands?
Name it with a name tag, or summon it with persistence: /summon zombie ~ ~ ~ {PersistenceRequired:1b} on Java.
How do you spawn a charged creeper?
On Java type /summon creeper ~ ~ ~ {powered:1b}. You can also strike a creeper with lightning, for example with a trident in a storm.
How do you make yourself invisible with a command?
Type /effect give @s invisibility infinite 0 true on Java. Armor and held items still show.
Source: Minecraft Wiki - Effect
How do you make a player an operator from the console?
Type op PlayerName in the server console (no slash). /deop PlayerName removes it.
Source: Minecraft Wiki - Op
How do you kick or ban a player?
/kick Name removes them for now. /ban Name blocks them, /ban-ip blocks their address and /pardon Name lifts a ban.
How do you hide command messages in chat?
Turn off send_command_feedback (sendCommandFeedback on Bedrock and Java before 1.21.11) with /gamerule to hide command result messages.
Source: Minecraft Wiki - Game rule
How do you copy a build with commands?
Use /clone with the two corners and the destination: /clone x1 y1 z1 x2 y2 z2 x y z. The limit is 32,768 blocks by default.
Source: Minecraft Wiki - Clone
How do you place a block with a command?
Type /setblock x y z minecraft:stone. Add destroy, keep or replace at the end to choose what happens to the old block.
Source: Minecraft Wiki - Setblock
How do you spawn a structure with a command?
On Java 1.19+, /place structure minecraft:village_plains places a structure where you stand.
Source: Minecraft Wiki - Place
What are game rules in Minecraft?
Game rules are world settings changed with /gamerule, such as keeping inventory, mob griefing, fire spread and the day cycle.
Source: Minecraft Wiki - Game rule
How do you turn off fire spread in Minecraft?
Set the fire spread game rule to 0: /gamerule fire_spread_radius_around_player 0 on Java 1.21.11+, or /gamerule doFireTick false on Bedrock and Java before 1.21.11.
Source: Minecraft Wiki - Game rule
How do you turn off phantoms in Minecraft?
Use /gamerule spawn_phantoms false on Java 1.21.11+, or /gamerule doInsomnia false on Bedrock and Java before 1.21.11.
Source: Minecraft Wiki - Game rule
How do you turn off fall damage in Minecraft?
Type /gamerule fall_damage false on Java 1.21.11+, or /gamerule fallDamage false on Bedrock.
Source: Minecraft Wiki - Game rule
How do you turn off death messages?
Use /gamerule show_death_messages false on Java 1.21.11+, or showDeathMessages on Bedrock and Java before 1.21.11.
Source: Minecraft Wiki - Game rule
How do you make crops grow faster with commands?
Raise the random tick speed: /gamerule random_tick_speed 30 on Java 1.21.11+ (randomTickSpeed on Bedrock). Higher values speed up plants and other random changes.
The default is 3 on Java and 1 on Bedrock. Very high values cause lag.
Source: Minecraft Wiki - Game rule
How do you turn on instant respawn?
Use /gamerule immediate_respawn true on Java 1.21.11+ (doImmediateRespawn on Bedrock and Java before 1.21.11). The death screen is skipped.
Source: Minecraft Wiki - Game rule
How do you stop mobs from spawning with a command?
Use /gamerule spawn_mobs false on Java 1.21.11+, or /gamerule doMobSpawning false on Bedrock and Java before 1.21.11.
Source: Minecraft Wiki - Game rule
How do you stop wandering traders from spawning?
On Java 1.21.11+ use /gamerule spawn_wandering_traders false (doTraderSpawning before 1.21.11). Bedrock has no game rule for it.
Source: Minecraft Wiki - Game rule
What does @a mean in Minecraft?
@a targets every player. Other selectors: @p nearest player, @r random player, @s yourself, @e all entities.
@n (nearest entity) works on Java 1.21+ and Bedrock 1.21.100+. Bedrock also has @initiator for NPC dialogue.
What does @e mean in Minecraft?
@e targets every entity: players, mobs, items, arrows and more. Add filters such as [type=cow] to narrow it down.
What does @s mean in Minecraft?
@s means "self": whoever or whatever runs the command. In chat that is you.
How do you target players in a range?
Add a distance filter on Java: @a[distance=..10] picks players within 10 blocks. Bedrock uses r=10.
How do you use a command block?
Place it, right-click to open it, type a command without the slash and set it to Impulse, Chain or Repeat. Power it with redstone or set Always Active.
Source: Minecraft Wiki - Command Block
What is the difference between impulse, chain and repeat command blocks?
Impulse runs once per redstone signal. Repeat runs every tick while powered. Chain runs right after the block that points into it.
Source: Minecraft Wiki - Command Block
Why is my command block not working?
Command blocks may be disabled on the server, the block may lack power, or the command has an error. Check the block's output box.
On Java 1.21.11+ the game rule command_blocks_work controls them (commandBlocksEnabled in 1.21.9 and 1.21.10). Older servers used enable-command-block in server.properties.
Source: Minecraft Wiki - Command Block, Minecraft Wiki - Server.properties
What is the /execute command?
/execute runs another command as a different entity, at a different place, or only when a condition is true.
Example: /execute as @a at @s run summon lightning_bolt strikes lightning at every player.
Source: Minecraft Wiki - Execute
What is a function in Minecraft?
A function is a text file of commands inside a data pack, run with /function. It lets one command run many.
What does /tellraw do?
/tellraw sends a formatted chat message using JSON text, with colors, bold text and clickable links.
Source: Minecraft Wiki - Tellraw
What does /scoreboard do?
/scoreboard tracks numbers for players, such as kills or deaths, and can show them in the sidebar, the tab list or under names.
Source: Minecraft Wiki - Scoreboard
More questions
Every topic is on the FAQ hub. Questions about the ArtemisPvP server itself (commands, ranks, events) are on the server FAQ. Server IP: play.artemispvp.com.