Minecraft Java Edition reference

Essential Minecraft Commands

A practical, unique reference for the most useful Minecraft commands. Copy-ready examples for teleport, gamemode, items, time, weather, effects, and world control — written for everyday survival and creative play on Java Edition.

Getting started

How commands work in Minecraft

Commands are entered in the chat (press T or /). Most useful commands require operator (OP) status or cheats enabled in a single-player world. On multiplayer servers the server owner decides who can run them.

Quick tip: Always start a command with a forward slash /. Coordinates use the format x y z. Relative coordinates use ~ (tilde) — for example ~ ~10 ~ means “10 blocks above your current position”.

Player control

Teleport, gamemode & more

These commands let you move quickly, change play style, and manage player state without leaving the game.

Teleport

/tp

/tp @s 100 70 -200

Teleport yourself to exact coordinates. Use /tp @s ~ ~10 ~ to jump 10 blocks up, or /tp PlayerName to teleport to another player.

Gamemode

/gamemode

/gamemode creative
/gamemode survival
/gamemode spectator

Switch between Survival, Creative, Adventure, and Spectator. Useful for building or testing without leaving the world.

Kill / Clear

/kill & /clear

/kill @s
/clear @s

/kill removes the targeted entity (including yourself). /clear empties the inventory. Both are powerful — use carefully.

Experience

/xp or /experience

/xp add @s 100 levels
/xp set @s 30 levels

Add or set experience levels. Handy when testing enchantments or repairing tools with anvils.

Items & inventory

Give items and control inventory

The /give command is one of the most used tools for creative building and testing. You can specify exact item IDs and quantities.

Give item

/give

/give @s diamond 64
/give @s netherite_ingot 16
/give @s cooked_beef 64

Gives the specified item and amount to the target player. Use the modern item ID (e.g. diamond_sword, oak_log).

Enchant

/enchant

/enchant @s sharpness 5
/enchant @s mending 1

Applies an enchantment to the item currently held in the main hand. Level must be valid for that enchantment.

Summon

/summon

/summon minecraft:villager
/summon minecraft:iron_golem ~ ~ ~

Spawns an entity at your location (or specified coordinates). Useful for testing farms or building scenes.

World control

Time, weather & gamerules

These commands let you control the environment and server/world rules without restarting the game.

Time

/time

/time set day
/time set night
/time set 0
/time add 1000

Set or advance the in-game time. day ≈ 1000, noon = 6000, night = 13000, midnight = 18000.

Weather

/weather

/weather clear
/weather rain
/weather thunder

Change the weather. You can also add a duration in seconds, e.g. /weather clear 600 for 10 minutes of clear sky.

Gamerule

/gamerule

/gamerule keepInventory true
/gamerule doDaylightCycle false
/gamerule mobGriefing false

Toggle important world rules. keepInventory is popular for more relaxed survival; doDaylightCycle freezes the day/night cycle.

Difficulty

/difficulty

/difficulty peaceful
/difficulty easy
/difficulty normal
/difficulty hard

Change the world difficulty on the fly. Useful when testing combat or when you want a temporary peaceful mode.

Status effects

Apply and clear potion effects

Effects can give temporary boosts (speed, strength, night vision) or be used for testing. Duration is in seconds; amplifier starts at 0 (level I).

Apply effect

/effect give

/effect give @s speed 60 1
/effect give @s night_vision 300 0
/effect give @s strength 120 2

Gives a status effect. Format: /effect give <target> <effect> [seconds] [amplifier].

Clear effects

/effect clear

/effect clear @s
/effect clear @s speed

Removes all effects or a specific one. Handy after testing or when an effect becomes annoying.

Common useful effects: speed, haste, strength, jump_boost, regeneration, resistance, fire_resistance, water_breathing, invisibility, night_vision, slow_falling.

Selectors

Who the command affects

Target selectors let you apply commands to yourself, nearest player, all players, or specific entities.

Questions

Minecraft commands FAQ

Why does a command say “Unknown or incomplete command”?

Usually a typo, missing argument, or the command is not available in your current version/game mode. Check the exact spelling and that cheats/OP are enabled.

Can I use these commands on a multiplayer server?

Only if you have operator permissions or the server allows the specific command. Many public servers disable or restrict powerful commands for fairness.

Do commands work the same in Bedrock and Java?

Many commands are similar, but syntax and available options differ. This guide focuses on Minecraft: Java Edition.

How do I find exact item or entity IDs?

Press F3 + H in-game to show advanced tooltips (item IDs appear when you hover). You can also use the in-game command suggestions that appear while typing.

Is there a way to run commands without being OP?

In single-player you need cheats enabled. On multiplayer only operators (or command blocks / datapacks set up by the owner) can run most commands.

Continue exploring

More Minecraft guides on Kolosok

Useful companion pages for players who use the Kolosok Launcher and related resources.