Minecraft Server Commands — Full List (Java, 2026)
Minecraft server commands let you manage players, change the world and run admin tasks from the console or in-game. Here's the full list that matters for a Java server, grouped by what you're doing — with the exact syntax. Most need operator (op) permission.
From the server console, type commands without the leading slash. In-game, you need operator status (/op yourname from the console) and you type them with the slash. Most admin commands require op.
Players & admin
| Command | What it does |
|---|---|
/op <player> | Grant operator (admin) status. |
/deop <player> | Remove operator status. |
/kick <player> [reason] | Kick a player from the server. |
/ban <player> [reason] | Ban a player by name. |
/ban-ip <player|ip> | Ban by IP address. |
/pardon <player> | Unban a player. |
/whitelist add|remove <player> | Manage the whitelist (with /whitelist on to enforce it). |
/list | List connected players. |
Gamemode & difficulty
| Command | What it does |
|---|---|
/gamemode <survival|creative|adventure|spectator> [player] | Set a player's game mode. |
/defaultgamemode <mode> | Set the mode new players join in. |
/difficulty <peaceful|easy|normal|hard> | Set the world difficulty. |
/gamerule <rule> <value> | Change a game rule (see below). |
Useful game rules
| Game rule | What it does |
|---|---|
/gamerule keepInventory true | Keep items and XP when you die. |
/gamerule doDaylightCycle false | Freeze the time of day. |
/gamerule doWeatherCycle false | Freeze the weather. |
/gamerule mobGriefing false | Stop mobs changing blocks (creepers, endermen). |
/gamerule doMobSpawning false | Stop natural mob spawning. |
/gamerule randomTickSpeed <n> | Crop/leaf growth speed (default 3). |
World, time & weather
| Command | What it does |
|---|---|
/time set <day|night|noon|midnight|number> | Set the time of day. |
/weather <clear|rain|thunder> [seconds] | Set the weather. |
/setworldspawn [x y z] | Set the world spawn point. |
/spawnpoint [player] [x y z] | Set a player's personal spawn. |
/seed | Show the world seed. |
/worldborder set <size> | Set the world border diameter. |
Items, teleport & players
| Command | What it does |
|---|---|
/give <player> <item> [count] | Give an item. |
/clear [player] [item] | Clear a player's inventory (or one item). |
/tp <player> <target> / /teleport | Teleport a player to another (or to coords). |
/effect give <player> <effect> [seconds] [amplifier] | Apply a status effect. |
/enchant <player> <enchant> [level] | Enchant the held item. |
/experience add <player> <amount> [points|levels] | Give XP. |
/kill [target] | Kill an entity or player. |
Server management & messaging
| Command | What it does |
|---|---|
/save-all | Force-save the world now. |
/save-off / /save-on | Disable / enable auto-save (for backups). |
/stop | Cleanly stop the server (console). |
/say <message> | Broadcast a message to everyone. |
/tell <player> <message> | Send a private message. |
/title <player> title <json> | Show a large on-screen title. |
/execute is the most powerful command in Minecraft — it runs another command as, at, or conditional on something else. It's how command blocks and datapacks do advanced logic. Worth learning once you're comfortable with the basics above.
Related Minecraft guides
New to running a server? See how to make a Minecraft server, tune it with best settings to reduce lag, and read server.properties explained. To make yourself admin, see how to op yourself.
Minecraft is a trademark of Mojang Synergies AB / Microsoft. ESAGAMES is an independent hosting provider, not affiliated with or endorsed by Mojang or Microsoft.
Minecraft hosting with console & RCON
Our Minecraft hosting gives you a live console, RCON and a full panel — run these commands and manage your server the easy way.
Frequently asked questions
How do I run commands on a Minecraft server?
From the server console, type them without the leading slash. In-game, you need operator status (run /op yourname from the console first) and you type them with the slash. Most admin commands require op.
How do I make myself admin on a Minecraft server?
Run /op yourname from the server console. That grants operator status, letting you run admin commands like /gamemode, /give and /kick in-game. Use /deop to remove it.
How do I keep my items when I die in Minecraft?
Run /gamerule keepInventory true. Players keep their items and XP on death from then on. Set it to false to return to normal.
How do I change the time or weather on a Minecraft server?
/time set day (or night/noon/midnight or a number) sets the time; /weather clear (or rain/thunder) sets the weather. Add /gamerule doDaylightCycle false or doWeatherCycle false to freeze them.
How do I give someone items or op in-game?
With op status, use /give
Do Minecraft server commands work the same on Bedrock?
Most core commands are similar, but some gamerule names and syntax differ between Java and Bedrock (for example keepInventory casing). This list is for Java 1.21; check Bedrock docs for its exact spellings.
Go deeper on this
Guides and explainers that pair with this fix — from our guides and blog.
How to Make a Minecraft Server
Set up a Java server from scratch — version, server.properties, EULA and going live.
ReadSettings to Reduce Minecraft Lag
View distance, Paper tuning and pre-generation for a smooth 20 TPS.
ReadBest Free Minecraft Plugins
EssentialsX, LuckPerms, WorldGuard and CoreProtect — the essentials.
ReadBest Minecraft Modpacks to Host
The best packs to run, and the RAM each one needs.
ReadMinecraft Modpack Hosting
One-click hosting for All the Mods, RLCraft, Cobblemon and more — with recommended RAM.
ReadRelated articles
Fix Minecraft "java.lang.OutOfMemoryError: Java heap space"
Server crashing with "OutOfMemoryError: Java heap space"? Every cause and how to fix it for good.
Read fix MinecraftHow to Allocate More RAM to a Minecraft Server
Give your Minecraft server more RAM — the -Xmx/-Xms flags, doing it in a panel, and how much to allocate.
Read fix MinecraftWhy Can't My Friends Join My Minecraft Server? (Every Fix)
Friends stuck on "Can't connect to server"? Every cause — IP, port, firewall, version, whitelist — and the fix.
Read fix