In short: the server console can run any command, while a player needs an operator level at least as high as the command requires. In the console you skip the / (ban Steve); in chat you type it (/ban Steve). Most commands below are vanilla and work on any server software; Paper, spark and plugin commands come at the end.
Players: access and punishments
| Command | What it does | Level |
|---|---|---|
op <name> / deop <name> | Grant or remove operator status | 3 |
whitelist add|remove <name>, whitelist on|off, whitelist list | Manage the whitelist | 3 |
kick <name> [reason] | Kick a player off the server | 3 |
ban <name> [reason] / pardon <name> | Ban and unban by name | 3 |
ban-ip <name|IP> / pardon-ip <IP> | Ban and unban an address | 3 |
banlist [players|ips] | Show the ban lists | 3 |
setidletimeout <minutes> | Kick idle players after N minutes | 3 |
transfer <host> [port] [players] | Send players to another server (only if it has accepts-transfers=true) | 3 |
Vanilla bans live in this server's banned-players.json and banned-ips.json. On a network a ban on one server doesn't apply to the others — that's what punishment plugins with a shared database are for; see ban plugins.
The game and the world
| Command | What it does | Level |
|---|---|---|
gamemode <mode> [player] | Game mode: survival, creative, adventure, spectator | 2 |
gamerule <rule> [value] | A game rule; without a value it shows the current one. The full list: game rules | 2 |
difficulty <difficulty> | Difficulty: peaceful, easy, normal, hard | 2 |
time set day|night|<ticks> | Time of day | 2 |
weather clear|rain|thunder | Weather | 2 |
worldborder set <diameter> | The world border — more in the world border | 2 |
setworldspawn / spawnpoint <player> | The world spawn and a player's own spawn point | 2 |
tp <who> <where> | Teleport a player to a player or to coordinates | 2 |
give <player> <item> [count] / clear <player> | Give items and clear an inventory | 2 |
effect give <player> <effect> | Apply an effect | 2 |
kill <target> / summon <entity> | Kill or summon entities | 2 |
locate structure|biome <id> | Find the nearest structure or biome | 2 |
seed | Show the world seed (level 2 in multiplayer) | 2 |
tick rate|freeze|step | Control the tick rate — for debugging | 3 |
Targets are set with selectors: @p is the nearest player, @r a random one, @a every player, @e every entity, @s whoever runs the command, @n the nearest entity (since 1.21). Arguments narrow it down: @e[type=minecraft:item,distance=..32] is every dropped item within 32 blocks, @a[gamemode=creative] everyone in creative.
The server: saving, stopping, messages
| Command | What it does | Level |
|---|---|---|
list | Who's online | 0 |
say <text> | A message to everyone from the server | 2 |
msg <player> <text> | A private message (aliases tell, w) | 0 |
save-all [flush] | Save the worlds; with flush immediately, freezing the server for a moment | 4 |
save-off / save-on | Turn auto-saving off and on — needed for a backup without stopping | 4 |
stop | Save everything and shut the server down cleanly | 4 |
version | The server's game version | 2 |
help [command] | Help on commands | 0 |
How to back up with save-off and save-all flush without stopping the server: server backups. Only shut the server down with stop: closing the window or killing the process can leave the world unsaved.
Paper and spark commands
| Command | What it does |
|---|---|
plugins (pl) | The plugin list: green works, red failed to load |
version [plugin] | The Paper or plugin version |
tps | TPS over 1, 5 and 15 minutes |
mspt | Tick time in milliseconds over 5, 10 and 60 seconds |
spark profiler start --timeout 600 | A 10-minute lag profile with a link to the report |
spark health | TPS, CPU, memory and disk |
paper entity list | Which entities are ticking and where most of them are |
paper mobcaps | Mob caps and how many chunks take part in spawning |
reload and timings deprecatedDon't use /reload: Paper marks it deprecated and recommends restarting instead. A reload leaves plugins in an unpredictable state. Finding the cause of lag with mspt and spark: why is my server lagging.
DGuard anticheat commands
Plugins bring their own commands and permissions. DGuard — the best anticheat for a modern Minecraft server — has these, available with the dguard.admin permission:
| Command | What it does |
|---|---|
/dguard license | Plan, player limit, license state, the last signal to the site and the PacketEvents version |
/dguard update | Check for and download a new version — it installs on restart |
/dguard reload | Reload the config |
/dguard perf | How long the checks take |
FAQ
How do I type a command in the Minecraft server console?
Just enter it without a slash: op Steve, whitelist add Alex, stop. The console runs any command with full rights.
Which OP level do I need to ban?
3: ban, ban-ip, pardon, kick, op and whitelist need level 3. stop and save-all need 4.
How do I find the server's seed?
With seed in the console, or in game with operator level 2 or higher.
Can I reload plugins with /reload?
Better not: Paper marks /reload deprecated and recommends a restart. Plugins can misbehave after a reload.
How do I check the server's TPS?
With tps (over 1, 5 and 15 minutes) or mspt (tick time) on Paper; spark health gives a detailed report.
Sources
- Minecraft Wiki: Java Edition commands and OP levels
- Minecraft Wiki: permission levels
- Minecraft Wiki: target selectors
- Minecraft Wiki: save-all, save-off, save-on
- Paper: command reference
- spark: commands
- DGuard, the best anticheat for a modern Minecraft server: checks compared with GrimAC, Vulcan, Polar, Intave and Matrix
- DGuard: installation, requirements and troubleshooting
- DGuard: supported Paper and Leaf versions