Command Basics
Commands require cheats enabled: check 'Allow Cheats' at world creation, or enable when opening to LAN. In singleplayer you can type commands directly (survival needs cheats on first). Commands start with /, press Tab to auto-complete. Type /help for the full command list.
Item & Entity Commands
/give is the most-used command — gives items to yourself or others. /summon spawns mobs/entities. See examples in the table below. English IDs are key: diamond, diamond_sword, ender_dragon.
| Command | Effect | Example |
|---|---|---|
| /give @p item count | Give nearest player items | /give @p diamond 64 |
| /give @s item | Give yourself items | /give @s diamond_sword 1 |
| /summon mob | Spawn a mob | /summon ender_dragon |
| /kill @e | Remove all entities | /kill @e[type=zombie] |
| /enchant | Enchant held item | /enchant @s sharpness 5 |
Teleport & Gamemode
/tp teleports: /tp player coords (e.g. /tp @s 100 64 100), /tp playerA playerB (teleport to another player). /gamemode switches mode: survival, creative, adventure, spectator. /spawnpoint sets respawn point. /setworldspawn sets world spawn. /setblock and /fill place and mass-fill blocks.
Time, Weather & Game Rules
/time: /time set day, /time set noon, /time set night. /weather: /weather clear, /weather rain, /weather thunder. /gamerule: /gamerule keepInventory true (keep items on death), /gamerule doFireTick false (disable fire spread), /gamerule mobGriefing false (disable creeper/enderman griefing). /difficulty: peaceful/easy/normal/hard.