Essential Minecraft Commands for 2026 (Full List for Players and Admins)
Commands are the heart of playing Minecraft flexibly. Whether you want to change game mode, spawn items, warp to a friend, lock time to permanent daytime, or set a server rule to keep items on death, it all takes a single line of command. But Minecraft has so many commands you cannot remember them all, and many require cheats or admin rights to use.
This article collects the most-used Minecraft commands into easy-to-scan tables, split into basic commands for regular players, a table of popular gamerules, and admin commands for server owners — plus how to enable cheats both on a single-player world and on a private server, so you can control your Minecraft world however you like.
Before Using Commands: Enable Cheats First
Most commands in Minecraft only work when "Allow Cheats" is enabled or you have admin rights on a server. If it is not enabled, typing a command just tells you that you lack permission — so you need to set this up correctly first.
On a single-player world, enable Cheats when creating a new world (in the More World Options screen), or for an existing world you can enable it temporarily by opening "Open to LAN" and choosing Allow Cheats: ON. On a private server, commands are reserved for those with OP (admin) rights, which we cover in the admin commands section.
- Type a command by pressing the / (slash) key to open the command box, then follow it with the command name
- Java Edition and Bedrock use similar basic commands, but some details (such as target selectors) differ slightly
- If what you type turns red, the command syntax is wrong or cheats are not enabled
The Most-Used Basic Commands
This is the group of commands nearly every player uses, from changing game mode, spawning items, and teleporting, to controlling time and weather. Take a look at the table below with real usage examples.
| Command | Function | Example |
|---|---|---|
| /gamemode | Change game mode (survival/creative/adventure/spectator) | /gamemode creative |
| /give | Spawn an item for a player | /give @s diamond 64 |
| /tp (teleport) | Warp yourself or a player to a spot/another person | /tp @s 100 64 -200 |
| /time set | Set time to day/night | /time set day |
| /weather | Change the weather | /weather clear |
| /kill | Kill a target (quickly restart yourself) | /kill @s |
| /xp or /experience | Add experience/levels | /xp add @s 30 levels |
| /effect | Apply/remove status effects | /effect give @s speed 60 2 |
| /setblock, /fill | Place/fill blocks over an area | /fill ~ ~ ~ ~5 ~5 ~5 stone |
| /seed | Show the current world seed | /seed |
Popular Gamerules (Including the Keep-Items-on-Death Command)
The /gamerule command sets rules for the whole world or server — such as keeping items on death, stopping the day-night cycle, or disabling fire spread. It is the command server admins use most. The format is /gamerule <rule name> <true/false or a numeric value>.
| gamerule | Result | Values |
|---|---|---|
| keepInventory | Keep all items on death instead of dropping them | true / false |
| doDaylightCycle | Enable/disable the day-night cycle (can freeze time) | true / false |
| doWeatherCycle | Enable/disable automatic weather changes | true / false |
| mobGriefing | Whether mobs can destroy/change blocks (creeper explosions) | true / false |
| doMobSpawning | Enable/disable monster spawning | true / false |
| doFireTick | Whether fire spreads and burns continuously | true / false |
| doImmediateRespawn | Respawn instantly on death without pressing a button | true / false |
| fallDamage | Whether you take damage from high falls | true / false |
| showDeathMessages | Show a message in chat when someone dies | true / false |
| randomTickSpeed | Speed of plant growth/random events | Number (default 3) |
Admin Commands for Server Management
If you open a server for friends, there is another group of commands reserved for admins (OP) — used to manage players, grant rights, ban troublemakers, and control access. These are typed in the server console or in-game by those with OP rights.
| Command | Function | Example |
|---|---|---|
| /op | Grant admin (operator) rights to a player | /op <player> |
| /deop | Revoke admin rights | /deop <player> |
| /whitelist | Manage the list of players allowed on the server | /whitelist add <player> |
| /ban, /ban-ip | Ban a player or ban by IP | /ban <player> |
| /pardon | Unban a player | /pardon <player> |
| /kick | Temporarily kick a player from the server | /kick <player> |
| /save-all | Save the world immediately (before backup/restart) | /save-all |
| /stop | Shut the server down safely | /stop |
| /difficulty | Set the server difficulty | /difficulty normal |
Tips to Use Commands Without Mistakes
Minecraft commands look complex at first, but once you grasp the basics you will type them fluently. The key tips are to use the auto-complete key and to understand how coordinates are structured.
- Press Tab while typing to have the game auto-complete command/item/player names for you
- Coordinates use the X Y Z format, where Y is height; use ~ (tilde) for "current position," e.g. ~ ~5 ~ is 5 blocks higher than you
- Item names use lowercase English, e.g. diamond_sword, not Diamond Sword
- If using on a server, test world-affecting commands (like /fill /gamerule) in a safe area first
- Back up the world before using commands that edit many blocks, so you can revert if something goes wrong
Want to Try Commands Freely? Open a Private Server
Playing with commands on a single-player world is fun, but once you invite friends, admin commands like /op /whitelist /ban truly matter, because you get to manage a server of your own — control the rules, control the people, and set gamerules however you like across the whole server.
Plusweb Minecraft Hosting starts at just ฿150/mo, supports both JAVA and BEDROCK, and lets you set gamerules and use admin commands through the control panel. It is ready instantly, and the Thai datacenter keeps ping low so the server stays smooth 24 hours a day — no need to leave a computer running at home.
- From ฿150/mo, supports both JAVA and BEDROCK
- Set gamerules / use admin commands through the control panel
- Install mods/modpacks/plugins, with automatic updates
- Ready instantly, choose your number of player slots
- Thai datacenter for low ping, 99.9% uptime
Want to play with friends without interruptions? Rent Minecraft Hosting
Supports both JAVA and BEDROCK · set gamerules/admin commands · ready instantly · Thai datacenter for low ping · from ฿150/mo
Frequently Asked Questions
What is the keep-items-on-death command in Minecraft?
It is /gamerule keepInventory true. When set to true, a player who dies does not drop their items and experience — everything is kept on respawn. To make items drop normally again, set it to false. This command requires cheats or admin rights first.
How do I type the change-game-mode command?
Use /gamemode followed by the mode name, e.g. /gamemode creative (unlimited items, fly), /gamemode survival, /gamemode adventure, /gamemode spectator (fly through blocks). Some versions accept short numbers, e.g. /gamemode 1 for creative.
Why does my command not work when I type it?
The most common causes are not having enabled Allow Cheats on a single-player world, or not having OP (admin) rights on a server. Another case is a typo in the command syntax, such as wrong spacing or a misspelled item name. Try pressing Tab to have the game auto-complete the command correctly.
What is the difference between gamerule and time set?
/time set changes the current time once, e.g. /time set day switches to day immediately, but time keeps moving. /gamerule doDaylightCycle false "stops" the time cycle from advancing. For permanent daytime, use both together: set the time to day, then disable daylightCycle.
Are commands on a server different from single-player?
Basic commands are the same, but a server adds admin commands like /op /whitelist /ban /kick /stop for managing players and controlling the server, usable only by those with OP rights. On a rented server like Plusweb, you set rights and use these commands conveniently through the control panel.
GUIDES
Related articles
Keep reading on similar topics

Whitelist + OP and How to Manage a Minecraft Server (2026 Edition)
Opened a Minecraft server and strangers keep griefing it? This article teaches you to set up a Whitelist to limit who joins, grant OP admin rights, ban troublemakers, plus how to keep your server safe — backups, RAM/lag management, and preventing griefing.
Read more
Full Minecraft Crafting Recipes by Category, 2026 (Including Potion Recipes)
Cannot remember every Minecraft crafting recipe? This article collects the recipes across every category into tables — basics, tools, armor, food, redstone, and a full potion (brewing) recipe table — easy to read and ready to reference on the spot.
Read more
How to Make a Minecraft Server to Play with Friends (Full Guide)
Want to run a Minecraft server with friends but don't know where to start? This article covers 2 options — self-hosting on your PC vs. renting a server — with pros and cons, step-by-step setup, a RAM-by-player-count table, and how to install mods.
Read more