Minecraft Server Commands: The Complete Admin List
This is the cheat sheet for running a Java Edition server: the commands you'll actually use, grouped by what you're trying to do. Everything here is vanilla, so it works on Paper, Spigot, Purpur and modded servers too.
/op and /deop, /whitelist add, /kick, /ban and /pardon, /tp, /gamemode, /time set day, /weather clear, /give, /gamerule, /save-all and /stop. In the console, leave off the slash.Before you start
- Operator status: almost every command here needs it. From your server console run
op YourName. More in how to OP yourself. - Chat vs console: in game, press
Tand start with/. In the console, no slash. - Targets: instead of a name you can use
@a(all players),@p(nearest),@r(random),@s(yourself) and@e(all entities). - Tab completes: type the start of a command and press Tab to see options.
Operators and permissions
| Command | What it does |
|---|---|
/op <player> |
Make a player an operator |
/deop <player> |
Remove operator status |
/list |
Show who's online |
For finer control than op or not op, use a permissions plugin, see LuckPerms ranks.
Whitelist
| Command | What it does |
|---|---|
/whitelist on |
Only whitelisted players can join |
/whitelist off |
Anyone can join |
/whitelist add <player> |
Add a player |
/whitelist remove <player> |
Remove a player |
/whitelist list |
Show the whitelist |
/whitelist reload |
Reload after editing whitelist.json by hand |
Full walkthrough: how to whitelist your server.
Kicks and bans
| Command | What it does |
|---|---|
/kick <player> [reason] |
Disconnect a player (they can rejoin) |
/ban <player> [reason] |
Ban a player by account |
/ban-ip <player or IP> [reason] |
Ban an IP address |
/pardon <player> |
Unban a player |
/pardon-ip <IP> |
Unban an IP |
/banlist |
Show bans (/banlist ips for IP bans) |
More on this: how to ban and unban players.
Moving players around
| Command | What it does |
|---|---|
/tp <player> <target player> |
Teleport one player to another |
/tp <player> <x> <y> <z> |
Teleport to coordinates |
/tp @a @s |
Bring everyone to you |
/spectate <target> |
Watch a player in spectator mode |
/spawnpoint <player> [x y z] |
Set a player's respawn point |
/setworldspawn [x y z] |
Move the world spawn (guide) |
Gamemode and difficulty
| Command | What it does |
|---|---|
/gamemode survival <player> |
Also creative, adventure, spectator |
/defaultgamemode survival |
Gamemode for new players |
/difficulty hard |
Also peaceful, easy, normal |
Details: how to change gamemode and difficulty.
Time and weather
| Command | What it does |
|---|---|
/time set day |
Also noon, night, midnight or a number |
/time add 1000 |
Skip ahead |
/weather clear |
Also rain, thunder; add a duration in seconds |
/gamerule advance_time false |
Freeze time (old name doDaylightCycle) |
Game rules
| Command | What it does |
|---|---|
/gamerule <rule> <value> |
Change a game rule |
/gamerule <rule> |
Show its current value |
Popular ones: keep_inventory, mob_griefing, players_sleeping_percentage, pvp. Full list with the new names: every game rule explained.
Items, effects and XP
| Command | What it does |
|---|---|
/give <player> <item> [amount] |
Give items, for example /give @s diamond 64 |
/clear <player> [item] |
Empty a player's inventory, or remove one item |
/effect give <player> <effect> [seconds] [level] |
For example /effect give @s night_vision 600 |
/effect clear <player> |
Remove effects |
/enchant <player> <enchantment> [level] |
Enchant the held item |
/xp add <player> <amount> levels |
Give XP levels |
/kill <target> |
Kill players or entities (careful with @e) |
World editing
| Command | What it does |
|---|---|
/locate structure <structure> |
Find the nearest village, stronghold and so on |
/locate biome <biome> |
Find a biome |
/seed |
Show the world seed |
/worldborder set <size> |
Set the world border diameter |
/setblock <x y z> <block> |
Place one block |
/fill <from> <to> <block> |
Fill an area |
/clone <from> <to> <destination> |
Copy an area |
/forceload add <x z> |
Keep a chunk loaded |
/summon <entity> [x y z] |
Spawn a mob or entity |
For big building edits, the WorldEdit plugin is much faster.
Talking to players
| Command | What it does |
|---|---|
/say <message> |
Announce to everyone |
/msg <player> <message> |
Private message (also /tell, /w) |
/title @a title "Event starting!" |
Big text on everyone's screen |
Saving, reloading and stopping
| Command | What it does |
|---|---|
/save-all |
Save the world to disk now |
/save-off and /save-on |
Pause and resume auto-saving (for manual copies) |
/reload |
Reload data packs and functions |
/stop |
Save and shut down the server |
Always use /stop (or your panel's stop button) instead of killing the server, so the world saves properly. If it hangs, see server stuck on stopping.
Tick and performance
| Command | What it does |
|---|---|
/tick query |
Show the current tick rate and timings |
/tick freeze and /tick unfreeze |
Pause and resume the game |
/tick rate 20 |
Set the tick rate (20 is normal) |
Related
FAQ
Do I type the slash in the console?
No. In the in-game chat commands start with /. In the server console you leave the slash off, for example op Steve.
Why does it say I don't have permission?
Most admin commands need operator status. Run op YourName from the server console first.
Do these commands work on Bedrock?
Many do, but Bedrock is missing some (for example it has no built-in ban commands) and a few work differently. This list covers Java Edition.
Want a server that just runs fast?
FreaksMC runs on NVMe hardware with performance-tuned defaults baked in - pre-optimized Paper, sane view distances, and one-click world pre-generation. Set up in 60 seconds.
See plans from $3/mo