Before you start
In the game, commands only work for operators. Make yourself one from the console with op YourName. In the chat, press T or / to open it, and press Tab while typing a command to see what can come next. That's the fastest way to learn the exact spelling for your version.
Most commands that target a player accept a name or a selector: @p is the nearest player, @a is everyone, @r is someone random and @s is you.
World and weather
| Command | What it does |
|---|---|
| time set day | Jump to morning |
| time set night | Jump to night |
| weather clear | Stop rain and thunder |
| difficulty normal | Peaceful, easy, normal or hard |
| setworldspawn | Make where you're standing the world spawn |
| seed | Show the world's seed |
Players
| Command | What it does |
|---|---|
| gamemode creative Name | Survival, creative, adventure or spectator |
| tp Name OtherName | Teleport one player to another |
| tp Name 100 64 -200 | Teleport to coordinates |
| give Name diamond 5 | Give items |
| spawnpoint Name | Set where they respawn |
| list | Show who's online |
Game rules
Game rules change how the world behaves. Type gamerule and press Tab to see every rule your version has, since names have changed over the years. These are the ones friend groups change most:
- keepInventory: keep your items when you die.
- playersSleepingPercentage: how many players need to sleep to skip the night. Set it to
0so one sleeper is enough. - doDaylightCycle: set to
falseto freeze the time of day. - mobGriefing: set to
falseto stop creepers blowing holes in the ground. - doInsomnia: set to
falseto stop phantoms appearing.
gamerule keepInventory trueSaving and stopping
Minecraft saves the world every few minutes on its own. Kiphost saves and shuts the server down cleanly when it naps, so you don't need to do anything. Before you download a backup, though, run save-all so the files on disk are current.
| Command | What it does |
|---|---|
| save-all | Write everything to disk now |
| say message | Send a message to everyone as the server |
| stop | Save and shut down. The Stop button does the same. |