These are the commands server owners use most often. They work the same on almost every Minecraft version. For what changed in the newest release, see "Java Console Commands (26.3)".
/, for example whitelist add Steve. Console commands have full permission./ first, for example /whitelist add Steve. You need to be op, or have the permission from a plugin like LuckPerms.@p is the nearest player, @a is all players, @r is a random player, @s is yourself, and @e is all entities.| Command | What it does |
|---|---|
list | Shows who's online |
op <player> / deop <player> | Gives or removes operator status |
whitelist on / whitelist off | Turns the whitelist on or off |
whitelist add <player> / whitelist remove <player> | Adds or removes a player from the whitelist |
kick <player> [reason] | Removes a player from the server |
ban <player> [reason] / pardon <player> | Bans or unbans an account |
ban-ip <player or IP> / pardon-ip <IP> | Bans or unbans an IP address |
banlist | Shows banned players (banlist ips for IPs) |
| Command | What it does |
|---|---|
say <message> | Sends a message to everyone, for example a restart warning |
msg <player> <message> | Sends a private message (also tell or w) |
title <player> title <text> | Shows big text on a player's screen |
| Command | What it does |
|---|---|
gamemode <mode> <player> | Changes a player's game mode: survival, creative, adventure or spectator |
defaultgamemode <mode> | Sets the game mode for new players |
difficulty <level> | peaceful, easy, normal or hard |
gamerule | Lists game rules. gamerule <rule> <value> changes one |
time set day / time set night | Changes the time of day |
weather clear | Changes the weather (clear, rain or thunder) |
| Command | What it does |
|---|---|
tp <player> <target player> | Teleports one player to another |
tp <player> <x> <y> <z> | Teleports a player to coordinates |
give <player> <item> [amount] | Gives items, for example give Steve diamond 5 |
clear <player> | Empties a player's inventory |
xp add <player> <amount> levels | Gives experience levels |
effect give <player> <effect> | Gives a status effect |
spawnpoint <player> | Sets a player's personal respawn point |
| Command | What it does |
|---|---|
seed | Shows the world seed |
setworldspawn <x> <y> <z> | Sets the world spawn |
worldborder set <size> | Sets the world border width in blocks |
locate structure <structure> | Finds the nearest structure, for example minecraft:village_plains |
kill @e[type=item] | Removes all dropped items, which helps with lag |
| Command | What it does |
|---|---|
save-all | Saves the world to disk now |
save-off / save-on | Pauses or resumes automatic saving |
stop | Saves and shuts down the server cleanly |
tick query | Shows server tick performance (1.20.3 and newer) |
Plugin servers. Paper, Purpur and Spigot add commands such as plugins, tps and version. Each plugin adds its own commands too. Check the plugin's page for its list. Avoid reload on plugin servers. Restart instead.