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.
Quick answer
Run Minecraft server commands from the console without the slash, or in-game with the slash once you are an operator (op YourName in the console). The ones you use most are /op, /gamemode, /tp, /give, /whitelist, /kick, /ban, /time set and /weather.
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.
Building & world-editing commands
| Command | What it does |
|---|---|
/setblock <x y z> <block> | Place a single block at coordinates. |
/fill <from> <to> <block> | Fill a whole region with a block. |
/clone <from> <to> <dest> | Copy a region of blocks to a new location. |
/locate structure <id> | Find the nearest structure (village, fortress…). |
/forceload add <from> <to> | Keep chunks loaded even when no player is near. |
/summon <entity> [x y z] | Spawn an entity (mob, item, armor stand). |
A web console lets you run these commands without joining the game. It comes with our Minecraft server hosting, together with one-click installs and NVMe storage in Frankfurt.
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.